[Resolved] Remove "Day" From Appearing

Home Forums Support [Resolved] Remove "Day" From Appearing

Home Forums Support Remove "Day" From Appearing

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1098581
    tbgr

    Good morning.

    I have the Calendar widget installed on the bottom-right of my website. It’s called “TBGR Archives.”

    When you click one of the calendar’s days for which there’s a post, it DOES take you to that post.

    However, it also has a headline such as: “Day: October 8, 2019

    I don’t want the word “Day” to appear before the date of the post. Is there a way to remove “Day”?

    Thank you.

    #1098901
    David
    Staff
    Customer Support

    Hi there,

    try this PHP snippet:

    add_filter( 'get_the_archive_title', function ( $title ) {
    
        if( is_day() ) {
    
            $title = get_the_date( _x( 'F j, Y', 'daily archives date format' ) );
    
        }
    
        return $title;
    
    });

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    #1098968
    tbgr

    Thank you.

    #1099067
    David
    Staff
    Customer Support

    You’re welcome

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.