• Hello, I’m tying to display date on the posts correctly. Here’s my code:

    add_filter( 'wp_title', 'append_to_title', 10, 3 );
    function append_to_title($title) {
    $date = get_the_date();
    return $title .= " | ".$date;
    }

    The code above displays both date and publisher name. When I click a date at fronted it doesn’t display related articles. It only reloads the page.

    How can I make it display all posts which were published at specified date, without breaking author link?

    • This topic was modified 11 months, 2 weeks ago by onurcan1977.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    By default, wp_title() does not generate any link, it simply outputs a plain text title with a separator. If you’re getting linked titles from it, your theme or a plugin has enhanced default behavior. You’ll need to determine how that is accomplished in order to have your added element be a separate link.

    Thread Starter onurcan1977

    (@onurcan1977)

    Thanks for the reply.

    [ Please do not bump. ]

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Help needed about displaying date and user’ is closed to new replies.