0
I need to know if a post is a new post or just a fixed post.
My code is this Aki:
<div class="row padding " >
<div class="col-md-5 padding ">
<?php the_post_thumbnail(); ?>
<?php
if ( is_sticky ()) echo '<div class="ribbon ribbon-top-left">
<span>fixo</span></div>' ?>
<?php
if ( is_page() !=1 ) If($cont == 0) echo '<div class="ribbon ribbon-top-left">
<span>novo</span></div>' ?>
</div>
<div class="col-md-7 padding ">
<!-- Título do post -->
<h2><?php the_title(); ?></h2>
<!-- Autor -->
<h5><?php the_author(); ?>,
<!-- Data -->
<?php echo get_the_date(); ?>
<p>Última atualização: <?php the_modified_time(); ?></p>
</h5>
<!-- Resumo do post -->
<?php the_excerpt(); ?>
</div>
</div>
I’d like to put the div
new written in the most recent post but the way I did if the person fixed a post to div
ends up going to the wrong post, follows an image marking where it should be.
I believe that Wordpress does not have a default Function for this, you should have to create one according to what you consider that a new post is new (less than 1 hour or less than 24 hours, etc.).
– iamdlm