I am currently using the Html5 blank framework and my nav function can be seen below. I would like to add the latest post as the second item in my wordpress navigation but I cannot see how to do it. I did find this link http://www.viper007bond.com/2011/09/20/code-snippet-add-a-link-to-latest-post-to-wordpress-nav-menu/ which seems to work for some people but not for my version of WordPress. I would like to pull through the latest post which is also tagged to a category to be a nav item. Any help would be much appreciated as I know very little php.

function html5blank_nav()
{
    wp_nav_menu(
    array(
        'theme_location'  => 'header-menu',
        'menu'            => '', 
        'container'       => 'div', 
        'container_class' => 'menu-{menu slug}-container', 
        'container_id'    => '',
        'menu_class'      => 'menu', 
        'menu_id'         => '',
        'echo'            => true,
        'fallback_cb'     => 'wp_page_menu',
        'before'          => '',
        'after'           => '',
        'link_before'     => '',
        'link_after'      => '',
        'items_wrap'      => '<ul>%3$s</ul>',
        'depth'           => 0,
        'walker'          => ''
        )
    );
}

Read more here: How to add a "Latest Post" link to my WordPress nav menu


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: