[Resolved] How to disable author link on Trade Theme in GeneratePress

Home Forums Support [Resolved] How to disable author link on Trade Theme in GeneratePress

Home Forums Support How to disable author link on Trade Theme in GeneratePress

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #935473
    Ali

    Good day

    i have been using the following code to disable the author and date link in GP theme. But, unfortunately, this code is not working on Trade theme (theme library). The date link is disabled but the author link is still clickable. How to disable that?

    Check the below link for reference. TrackerZone is clickable. i want to disable it.

    https://trackerzone.pk/car-security-challenges-in-karachi/

    i have been using this code for GP theme and it works perfect (only GP theme)

    add_filter( ‘generate_post_date_output’,’tu_remove_date_link’, 10, 2 );
    function tu_remove_date_link( $output, $time_string ) {
    printf( ‘<span class=”posted-on”>%s</span>’,
    $time_string
    );
    }
    add_filter( ‘generate_post_author_output’,’tu_no_author_link’ );
    function tu_no_author_link() {
    printf( ‘ <span class=”byline”>%1$s</span>’,
    sprintf( ‘<span class=”author vcard” itemtype=”http://schema.org/Person&#8221; itemscope=”itemscope” itemprop=”author”>%1$s <span class=”fn n author-name” itemprop=”name”>%4$s</span></span>’,
    __( ‘by’,’generatepress’),
    esc_url( get_author_posts_url( get_the_author_meta( ‘ID’ ) ) ),
    esc_attr( sprintf( __( ‘View all posts by %s’, ‘generatepress’ ), get_the_author() ) ),
    esc_html( get_the_author() )
    )
    );
    }

    Please guide.

    Thank you

    #935599
    David
    Staff
    Customer Support

    Hi there,

    that could doesn’t apply ( obviously ๐Ÿ™‚ ) to the template tags in the Page Hero.
    Simplest way is to stop pointer events on the a tags in the hero with this CSS:

    .page-hero a {
        pointer-events: none;
    }

    Will that do the job?

    #935602
    Ali

    Hello David. It worked. ๐Ÿ˜‰

    A bundle of thanks

    #935610
    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.