Ready to get started?Download WordPress


Nav Menu Item Linking to Today's Posts (2 posts)

  1. adragt
    Posted 2 months ago #

    Would it be hard to have a link in the menu that always gathered the posts/events for the current date? So you could have a link that just said "Todays' Events" and it would just link to whatever events(posts) are happening on whatever date it happens to be?? Thought I'd throw it out here and see if anyone knows

    I *think* it has something to do with get_day_link but I really can't figure out how to make a menu item out of that.


  2. paka
    Posted 2 months ago #

    Hello adragt

    I would suggest, to extend the Walker_Nav_Menu class. There is a function named end_lvl. You can overwrite this function, and insert the menu item here, bevore the ending .

    Here ara some infos: http://codex.wordpress.org/Function_Reference/wp_nav_menu
    there is also an article here: http://codex.wordpress.org/Function_Reference/wp_nav_menu.

    I hope this helps.

    Greets Paka


You must log in to post.

About this Topic