edizzz
Gamma
¡Usuario con pocos negocios! ¡Utiliza siempre saldo de Forobeta!
Hola a todos hace un tiempo que no toqueteo los códigos de mi web, y desde la semana pasada mi novia se dio cuenta de que los post aleatorios repiten las mismas imágenes, estoy usando el tema Bootstrap este WordPress › The Bootstrap « Free WordPress Themes ademas de eso, por ejemplo las imágenes que son muy grandes las sube en su tamanho original y queda por debajo del sidebar el código que tengo en mi archivo php o sea mi página aleatoria es este
y tambien tengo el post random osea cada entrada tiene los botones de siguiénte post, y post anterior y le hice una página con el querry random y le agregue el código y funciono perecto y de repente ya no, lo hice con este código php
Ahora no se si es el wpscache muchas gracias...
PHP:
<?php
/*
Template Name: Aleatorio
*/
get_header(); ?>
<?php query_posts('orderby=rand') ?>
<p class="lead">
Para navegar mejor por la página puede utilizar las teclas Derecha e Izquierda </p>
<section id="primary" class="span8">
<?php tha_content_before(); ?>
<div id="content" role="main">
<?php tha_content_top();
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
get_template_part( '/partials/content', get_post_format() );
}
the_bootstrap_content_nav( 'nav-below' );
}
else {
get_template_part( '/partials/content', 'not-found' );
}
tha_content_bottom(); ?>
</div><!-- #content -->
<?php tha_content_after(); ?>
</section><!-- #primary -->
<?php
get_sidebar();
get_footer();
/* End of file index.php */
/* Location: ./wp-content/themes/the-bootstrap/index.php */
y tambien tengo el post random osea cada entrada tiene los botones de siguiénte post, y post anterior y le hice una página con el querry random y le agregue el código y funciono perecto y de repente ya no, lo hice con este código php
PHP:
<?php
/** single.php
*
* The Template for displaying all single posts.
*
* @author Konstantin Obenland
* @package The Bootstrap
* @since 1.0.0 - 05.02.2012
*/
get_header(); ?>
<section id="primary" class="span8">
<?php tha_content_before(); ?>
<div id="content" role="main">
<nav id="nav-single" class="pager">
<p class="lead">
Para navegar mejor por la página puede utilizar las teclas Derecha e Izquierda </p>
<section id="secondary" class="widget-area span4" role="complementary">
</nav><!-- #nav-single -->
<?php the_ID(); ?>
<?php query_posts('showposts=1&orderby=rand'); ?>
<?php tha_content_top();
while ( have_posts() ) {
the_post();
get_template_part( '/partials/content', 'single' );
comments_template();
} ?>
<h4>Aqui puedes ver algúnas imágenes Aleatorias!
<br>
<?php get_related_posts_thumbnails(); ?><br>
<?php tha_content_bottom(); ?>
</div><!-- #content -->
<?php tha_content_after(); ?>
</section><!-- #primary -->
<?php
get_sidebar( image );
get_footer();
/* End of file index.php */
/* Location: ./wp-content/themes/the-bootstrap/single.php */
Ahora no se si es el wpscache muchas gracias...

