Well, I've created a custom page where I need it to return everyone the posts you have registered on the site, just like home.
I tried to do it in the normal way, creating a custom page and assigning elá the same code that is in index.php
, but when I try to list all the posts it only returns me the page as if it were a publication page ...
<?php
/*
Template Name: Novos Posts
*/
get_header(); ?>
<div class="cont_marg">
<div class="pad_sd">
<?php if (have_posts()) : ?>
<ul class="lista-filmes">
<?php while ( have_posts() ) : the_post(); ?>
<?php $my_meta = get_post_meta($post->ID,'_my_meta',TRUE); ?>
<li id="post-<?php the_ID(); ?>" title="<?php the_title(); ?>">
<div class="titulo-box open-sans">
<h2 class="titulo-box-link">
<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
</h2>
</div>
<div class="capa">
<div class="fluccs">
<div class="boxxer"><?php echo $my_meta['durat']; ?>min</div>
</div>
<a href="<?php the_permalink(); ?>" class="absolute-capa no-text effect"><?php the_title(); ?></a>
<?php the_post_thumbnail(array(158,226)); ?>
<div class="flutuador" style="background:none;">
<div class="audioy"><?php echo the_qualt($my_meta['qualt']); ?></div>
<div class="anolanc"><?php echo $my_meta['ano']; ?></div>
</div>
</div>
<div class="views"><?php echo getPostViews(get_the_ID()); ?> visitas</div>
</li><!-- #post-<?php the_ID(); ?> -->
<?php endwhile; ?>
<?php post_pagination();?>
</ul>
<?php endif; ?>
</div><!-- .pad_sd -->
</div><!-- .cont_marg -->
<?php get_footer(); ?>
Do you know when we create a custom page? Okay, just that I do not want this page to be a post, I want it to return all the posts I already have, but it only returned me what it weighs to be hers. Did you understand ??