I'm looking for a function to add a "new" label in front of my custom post type name in my navigation menu. The code is :
<?php $args = array( 'numberposts' => '1' ); $recent_post = wp_get_recent_posts( $args ); if (strtotime($recent_post['post_date']) > strtotime('-7 days')) $class = "new!"; ?>
I beginning to understand... I'm trying to change
$class = "new!" by a simple text like
It works but the text isn't just in front of the post-type name... same thing using
H1 class or something like that...
So my last step is to uderstand how to use
$class = "new!" to display the "new!" text just next to my "books" name in the menu...
Sorry again for my bad english...