• Resolved helpingmedia

    (@helpingmedia)


    Hi,

    The time stamp to the right of the main menu in my template (Billion) is out by a day. I have the right date in the settings and on my computer. Any clues?

    http://www.mediahelpingmedia.org/blog/

    Perhaps it is meant to show the date of the last time the site was updated. If so, which file do I need to edit to add ‘Last updated:’.

    Alternatively, if it can’t be fixed, which file do I edit to comment it out?

    David

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter helpingmedia

    (@helpingmedia)

    I have realised what it is. The time stamp to the right of my top menu relates to the page or item you are viewing at the time, not today’s date.

    http://www.mediahelpingmedia.org/blog/

    So now my question is how do I disable it? Does anyone know how to comment it out and which file I need to edit, please?

    David

    in functions.php:

    add_filter( 'wp_nav_menu_items', 'billions_date_menu_item', 10, 2 );
    function billions_date_menu_item( $items, $args ) {
     	if( $args->theme_location == 'primary' ) {
    		$homelink = '<li class="menu-item right date">' . get_the_time( 'l, F j, Y' ) . '</li>';
    		$items =  $items . $homelink;
    	}
    	return $items;
    }

    if you change ‘get_the_time’ to ‘date’ you should get the current date output.

    if you remove the code, the date should be gone.

    Thread Starter helpingmedia

    (@helpingmedia)

    Fantastic, thanks. It worked. I wish I knew how to do this stuff. Very grateful. Looks great now. David

    Thread Starter helpingmedia

    (@helpingmedia)

    Oops, forgot to mark topic as resolved.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Theme Billion] Time stamp a day out’ is closed to new replies.