Home › Forums › Support › Add date on navigation bar This topic has 5 replies, 3 voices, and was last updated 6 years, 10 months ago by Tom. Viewing 6 posts - 1 through 6 (of 6 total) Author Posts June 14, 2016 at 7:34 am #201890 Michael B. Is there a way to add the current date such as “June 13, 2016” on the navigation bar to the far right? Or at least some where at the top of the website? Thanks Michael June 14, 2016 at 10:41 am #201974 TomLead Developer Lead Developer Hi there, Good question! Give this code a try: add_action( 'generate_inside_navigation','generate_date_navigation' ); function generate_date_navigation() { ?> <span class="nav-date"> <?php the_date(); ?> </span> <?php } Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/ Then add this CSS: .nav-date { float: right; } Adding CSS: https://generatepress.com/knowledgebase/adding-css/ That should get you going ๐ July 22, 2016 at 11:56 am #212017 Mosche Hi Tom, What would the code be if I want to add it to the secondary Nav Menu? Regards, Mosche July 22, 2016 at 6:32 pm #212126 TomLead Developer Lead Developer This would be the function for the secondary navigation: add_action( 'generate_inside_secondary_navigation','generate_date_secondary_navigation' ); function generate_date_secondary_navigation() { ?> <span class="nav-date"> <?php the_date(); ?> </span> <?php } July 22, 2016 at 7:36 pm #212133 Mosche Thanks Much Tom. Works like a charm. Regards, Mosche July 23, 2016 at 12:02 am #212158 TomLead Developer Lead Developer Glad I could help ๐ Author Posts Viewing 6 posts - 1 through 6 (of 6 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In