Código:
Si yo uso esto para reiniciar los post también queda mal:get_header(); ?>
<ul class="random_images_container">
<?php $posts = get_posts('orderby=rand&numberposts=8'); foreach($posts as $post) { ?>
<li>
<div class="random_image">
<!-- image -->
<?php the_post_thumbnail(); ?>
<!-- description div -->
<div class='random_description'>
<!-- description content -->
<?php if(strlen(get_the_title())>28)
{
$variabletitle = get_the_title();
$titulomostrado = substr($variabletitle,0,28);
$title_random = $titulomostrado."...";
}else{
$title_random = get_the_title();
}
?>
<div class='random_description_content'><a href="#"><?php echo $title_random; ?></a></div>
<!-- end description content -->
</div>
<!-- end description div -->
</div>
</li>
<?php } ?>
</ul>
<div id="content-middle">
<div id="home_ads">
</div>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php if ( have_posts() ) : ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="home_post_middle">
<div id="home_post_tumbnail"><?php the_post_thumbnail(); ?></div>
<?php
/* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
?>
</div>
<?php endwhile; ?>
<?php next_posts_link( '<div class="nav-previous">Viejas entradas</div>' ); ?>
<?php previous_posts_link( '<div class="nav-next">Nuevas entradas</div>' ); ?>
<?php else : ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Código:
Probé también con <?php wp_reset_postdata(); ?> y nada, nada funciona las entradas siguen saliendo aleatorias...<?php $posts = get_posts('orderby=date'); foreach($posts as $post) { ?>
Alguien me puede ayudar?
Muchas gracias!



