Thesis navigation menu provides a lot of customization features. When we add a new post in WordPress it shows up in the blog page automatically. But, sometimes you may want to include the recent blog post to be added to thesis navigation menu as a dropdown menu item.
To add recent posts to thesis navigation menu as a dropdown, you just need to place the following code in functions.php:
function custom_nav() {
echo '<li class="tab tab-recent"><a href="'.get_home_url().'">My Blog</a><ul>';
wp_get_archives('title_li=&type=postbypost&limit=10');
echo '</ul></li>';
}
add_action('thesis_hook_last_nav_item',' custom_nav ');
That’s all required. And you will have your recent blog posts showing under thesis navigation menu.
Join 37,807 others and get free tutorials & tips on design & development using Wordpress on, Thesis & Genesis!
Need help with Wordpress, Thesis or Genesis?
Are you a designer or a developer looking for a hand with Wordpress, Thesis or Genesis? Or perhaps want to save time with a project? Get in touch and let's get the ball rolling! Check out our Thesis development, PSD to Thesis & other services.
