Support » Plugin: Yoast SEO » Failed on removing author link for a specific post type

  • Resolved alesub

    (@alesub)


    Hi!

    I’m trying to remove the author tag from the header using the API filters without luck.

    Here’s my code:

    function author_for_products( $author ){
        if( get_post_type() == 'product' ){
            return false;
        }else{
            return $author;
        }
    }
    add_filter( 'wpseo_author_link', 'author_for_products' );

    Anyone sees what can be wrong?

    Thanks in advance!

    http://wordpress.org/plugins/wordpress-seo/

Viewing 1 replies (of 1 total)
  • Ha, I knew I’ll find the solution after posting the issue.

    The right filter is “wpseo_opengraph_author_facebook”.

Viewing 1 replies (of 1 total)
  • The topic ‘Failed on removing author link for a specific post type’ is closed to new replies.