Posts não aparecem na Página se não for index.
-
Olá boa tarde, estou com um problema, onde meus POSTS aparecem normalmente na pagina index.php porem criei uma pagina idêntica chamada portfolio, porem nela não aparece os posts inseridos, mas aparece o nome da pagina como se fosse um post.
IMAGENS:
<main id="main" class="grid cf" role="article" itemscope itemprop="mainContentOfPage" itemtype="http://schema.org/Blog"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <article id="post-<?php the_ID(); ?>" <?php post_class( 'cf' ); ?> role="article" class=""> <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"> <div class="element-item" style=" background-image:url(<?php echo $image[0];?>); "> <div class="mask"> <div class="conteudo_mask" style="transform: translateY(-50%);top: 50%;position: relative;"> <h1><?php the_title(); ?></h1> <div id="lin" style="width: 110px;"></div> <h2><?php foreach((get_the_category()) as $category) { echo $category->cat_name . ' '; } ?></h2> </div> <h3 style="transform: translateY(-50%);top: 50%;position: relative;">VEJA <br><img src="<?php echo get_template_directory_uri(); ?>/library/images/mais.png" alt="mais" style="width: 20px;height: 19px;margin-bottom: -1px;margin-top: 12px;margin-left:0px;"> </h3> </div> </div> </a> </article> <?php endwhile; ?> <?php bones_page_navi(); ?> <?php else : ?> <article id="post-not-found" class="hentry cf"> <header class="article-header"> <h1><?php _e( 'Oops, Post Not Found!', 'bonestheme' ); ?></h1> </header> <section class="entry-content"> <p><?php _e( 'Uh Oh. Something is missing. Try double checking things.', 'bonestheme' ); ?></p> </section> <footer class="article-footer"> <p><?php _e( 'This is the error message in the index.php template.', 'bonestheme' ); ?></p> </footer> </article> <?php endif; ?> </main>
Visualizando 5 respostas - 1 até 5 (de um total de 5)
Visualizando 5 respostas - 1 até 5 (de um total de 5)
- O tópico ‘Posts não aparecem na Página se não for index.’ está fechado para novas respostas.