michelmfreitas 1 Denunciar post Postado Maio 3, 2012 Olá pessoal, estou com alguns probleminhas no WP. Customizei meu tema e algumas opções. Porém, quando clico em alguma página, ele não me mostra o seu conteúdo. =/ Alguém sabe me dizer onde está meu erro aí?? Segue meu código da index.php <?php if ( have_posts() ) : ?> <?php twentyeleven_content_nav( 'nav-above' ); ?> <?php add_theme_support( 'post-thumbnails' ); if ( is_home() ) { query_posts(array ( 'category_name' => 'Destaques', 'posts_per_page' => 3 ) ); while ( have_posts() ) : the_post(); echo "<div class='destaques'>"; echo "<h2>"; the_title(); echo "</h2>"; the_post_thumbnail(); the_excerpt(); echo "</div>"; endwhile; wp_reset_query(); } ?> <?php if ( is_home() ) { query_posts(array ( 'cat' => 6, 'posts_per_page' => 3 ) ); while ( have_posts() ) : the_post(); echo "<div class='destaques'>"; echo "<h2>"; the_title(); echo "</h2>"; the_post_thumbnail(); echo "</div>"; endwhile; wp_reset_query(); } ?> <? echo "<br style='clear:both;' />"; ?> <?php twentyeleven_content_nav( 'nav-below' ); ?> <?php else : ?> <article id="post-0" class="post no-results not-found"> <header class="entry-header"> <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1> </header><!-- .entry-header --> <div class="entry-content"> <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p> <?php get_search_form(); ?> </div><!-- .entry-content --> </article><!-- #post-0 --> <?php endif; ?> Compartilhar este post Link para o post Compartilhar em outros sites
Tiago Sousa_111711 0 Denunciar post Postado Maio 21, 2012 Bom michelmfreitas, seu código exibe apenas a miniatura e o título. Para exibir o conteúdo respectivo da página ao invés de while ( have_posts() ) : the_post(); echo "<div class='destaques'>"; echo "<h2>"; the_title(); echo "</h2>"; the_post_thumbnail(); the_excerpt(); echo "</div>"; endwhile; Você deve colocar: while ( have_posts() ) : the_post(); echo "<div class='destaques'>"; echo "<h2>"; the_title(); echo "</h2>"; the_post_thumbnail(); <?php the_content(); ?> the_excerpt(); echo "</div>"; endwhile; A alteração só foi feita colocando o destaque em negrito. Era isso que faltava. Compartilhar este post Link para o post Compartilhar em outros sites