Problemas con módulo de Posts destacados y ajustes de publicaciones

  • Autor Autor Echoes
  • Fecha de inicio Fecha de inicio
E

Echoes

Gamma
SEO
Pues eso, hasta hoy ahbía funcionado bien, pero mirad lo que acabo de encontrarme:
Enlace eliminado
Se queda pillado en una imagen y no avanza, además de que ya no está igual, antes era un iframe, con la imagen centrada, y el texto mejor expuesto.
Cómo puedo solucionarlo?
Ya he probado a "resetear" el código de featured.php
Ayuda!

Aprovecho para preguntar: Me salen todas las entradas que publico en la página 1 y las demás páginas vacías!!!
Como cambio eso?? En los ajustes del blog tengo puesto que máximo 5 por página, pero no me hace caso!
 
Desde cuando te pasa eso? Modificaste el featured.php o actualizaste algo?
Asi rápidamente se me ocurre que podría ser un error en el loop, eso que va así:
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
......
<?php endwhile; else: ?>
<p><?php _e('No se encontró el post o lo que sea que vaya aquí xD.'); ?></p>
<?php endif; ?>

Fijate si no hay error por ahí, si no borraste por error el cierre de php, etc. Esto checalo para el featured.php y para el index.php
 
Desde cuando te pasa eso? Modificaste el featured.php o actualizaste algo?
Asi rápidamente se me ocurre que podría ser un error en el loop, eso que va así:
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
......
<?php endwhile; else: ?>
<p><?php _e('No se encontró el post o lo que sea que vaya aquí xD.'); ?></p>
<?php endif; ?>

Fijate si no hay error por ahí, si no borraste por error el cierre de php, etc. Esto checalo para el featured.php y para el index.php

En el featured.php me parece que esta todo bien porque para ver si ahbia error ahi lo substitui por el featured.php original del tema por si habia borrado algo que no debiera, pero con el idnex no puedo hacer lo mismo que pierdo muchas cosas.

Os pongo el cogido del index y del featured a ver si veis algo:
(Y si, estuve modificando antes algunas cosas, mas que nada traduciendo del ingles pero no encuentro el fallo, a ver si vosotros lograis identificarlo):

INDEX.PHP:
Insertar CODE, HTML o PHP:
<?php if ((!function_exists("check_theme_footer") || !function_exists("check_theme_header"))) { ?><?php { /* nothing */ } ?><?php } else { ?><?php get_header(); ?>

<div id="content">
<div id="contentinner">

<?php $featured_slider_activate = get_theme_option('featured_activate'); if(($featured_slider_activate == '') || ($featured_slider_activate == 'No')) { ?>
<?php { /* nothing */ } ?>
<?php } else { ?>
<?php if((is_home()) && (is_front_page()) && ($paged < 1)) { ?>
<?php include (TEMPLATEPATH . '/includes/featured.php'); ?> 
<?php } ?>
<?php } ?>

<div id="post-entry">

<?php $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query('showposts=10&cat=&paged=' . $paged);?>

<?php $postcounter = 0; if ($wp_query->have_posts()) : ?>

<?php while ($wp_query->have_posts()) : $postcounter = $postcounter + 1; $wp_query->the_post();?>

<div class="post-meta" id="post-<?php the_ID(); ?>">
<div class="post-info">
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
<div class="post-date">
Posted On <?php the_time('l, F j, Y') ?> By <?php the_author_posts_link(); ?>. Under&nbsp;<?php the_category(', ') ?>&nbsp;&nbsp;<?php if(function_exists("the_tags")) : ?><?php the_tags('Tags:&nbsp;') ?><?php endif; ?>&nbsp;&nbsp;<?php edit_post_link('+Editar Publicación'); ?>
</div><!-- POST DATE END -->
</div><!-- POST INFO END -->
<div class="post-content">
<?php if ( has_post_thumbnail() ) { ?>
<?php the_post_thumbnail(array(200,150), array('class' => 'alignleft')); ?>
<?php } ?>
<?php the_post_excerpt($excerpt_length=50); ?>
<div class="readmore"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">Leer más</a></div>
<div class="clearfix"></div>
</div><!-- POST CONTENT END -->
<div class="post-com"><?php comments_number('Sin Comentarios', '1 Comentario', '% Comentarios'); ?></div>
<div class="clearfix"></div>
</div><!-- POST META <?php the_ID(); ?> END -->

<?php $get_google_code = get_theme_option('adsense_loop'); if($get_google_code == '') { ?>
<?php } else { ?>
<?php if($postcounter <= 3){ ?>
<div class="adsense-loop">
<?php echo stripcslashes($get_google_code); ?>
</div>
<?php } ?>
<?php } ?>

<?php endwhile; ?>

<?php else : ?>

<p class="center">NO ENCONTRADO</p>

<p class="center">Lo sentimos, pero estás buscando algo que no se encuentra aquí.</p>

<?php endif; ?>

<?php $wp_query = null; $wp_query = $temp; ?>

</div><!-- POST ENTRY END -->

<?php include (TEMPLATEPATH . '/includes/paginate.php'); ?>

</div><!-- CONTENTINNER END -->
</div><!-- CONTENT END -->

<?php get_sidebar(); ?>

<?php get_footer(); ?><?php } ?>

FEATURED.PHP:
Insertar CODE, HTML o PHP:
<?php $featured_category = get_theme_option('featured_category'); $featured_number = get_theme_option('featured_number'); ?>
	
<?php if(($featured_category == "Choose a category:") || ($featured_number == 'Number of post:')) { ?>
	
<?php { /* nothing */ } ?>

<?php } else { ?>

<div id="featured">
<div id="featured-title">Artículos Destacados</div>
<div id="Gallerybox">
<script type="text/javascript">
function startGallery() {
var myGallery = new gallery($('myGallery'), {
timed: true,
showArrows: true,
showCarousel: false,
embedLinks: true
});
document.gallery = myGallery;
}
window.onDomReady(startGallery);
</script>	

<div id="myGallery">

<?php
global $post;
$category_id = get_cat_id($featured_category);
$my_query = new WP_Query('cat='. $category_id . '&' . 'showposts='. $featured_number . '&' . 'orderby=date');
while ($my_query->have_posts()) : $my_query->the_post();
$do_not_duplicate = $post->ID;
$the_post_ids = get_the_ID();
?>

<div class="imageElement post-<?php the_ID(); ?>">
<?php $values = get_post_custom_values("feat-img"); if (isset($values[0])) : ?>
<img src="<?php $values = get_post_custom_values("feat-img"); echo $values[0]; ?>" class="full" alt="<?php the_title(); ?>" />
<?php else : ?>
<img src="<?php echo get_featured_slider_image(); ?>" class="full" alt="<?php the_title(); ?>" />
<?php endif; ?>
<h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
<p><?php the_featured_excerpt($excerpt_length=30); ?></p>
<a href="<?php the_permalink(); ?>" title="open image" class="open"></a>
</div><!-- IMAGE ELEMENT POST <?php the_ID(); ?> END -->

<?php endwhile;?>

</div><!-- MYGALLERY END -->
</div><!-- GALLERBOX END -->
</div><!-- FEATURED END -->

<?php } ?>

ayuda, nadie??
 

Temas similares

Atrás
Arriba