• Hi there,

    I have two questions for you:

    1) Is there a way to remove the link on the date?

    2) Also, is there a way to put the link on the whole “block”/div instead of on the title?

    Thanks so much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter maryb1

    (@maryb1)

    Note : sorry about the error in my ticket title, I mean “remove link from date”, not title…

    Plugin Support Elvin

    (@ejcabquina)

    Hi @maryb1

    You’ll need to use a PHP filter for it.

    Try this:

    add_filter( 'wpsp_date_output', 'tu_wpsp_remove_date_link' );
    function tu_wpsp_remove_date_link() {
        $time_string = '<time class="wp-show-posts-entry-date published" datetime="%1$s" itemprop="datePublished">%2$s</time>';
    
        if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
            $time_string .= '<time class="wp-show-posts-updated" datetime="%3$s" itemprop="dateModified">%4$s</time>';
        }
    
        $time_string = sprintf( $time_string,
            esc_attr( get_the_date( 'c' ) ),
            esc_html( get_the_date() ),
            esc_attr( get_the_modified_date( 'c' ) ),
            esc_html( get_the_modified_date() )
        );
    
        printf(
            '<span class="wp-show-posts-posted-on wp-show-posts-meta">%1$s</span>',
            $time_string
        );
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove title from date’ is closed to new replies.