• Resolved vitorhugo

    (@vitorhugo)


    Hi, I know there is an old post with the same question, but no solution.

    The JSON print the author info and one of them is the wordpress URL, but the slug is the author login. There is a way to remove it?

    Per Google guidance it isn’t necessary, right?

Viewing 1 replies (of 1 total)
  • Plugin Author Hesham Zebida

    (@hishaman)

    Yes, there is a way to modify Author markup. For example; you can use a filter to remove author link from the schema markup output:

    add_filter( 'schema_wp_author', 'schema_author_output_modify_8198771356' );
    /**
     * Modify The Author Schema Markup in Schema Plugin
     *
     * @param array $author
     * @return array 
     */
    function schema_author_output_modify_8198771356( $author ) {
      
    	// Remove Author URL from the markup
    	unset($author['url']);
    	
    	// Return the array
    	return $author; 
    }

    Get code example form this gist.

    P.S. This code snippets should be placed in your Theme’s functions.php file. After you add the snippets, try saving the Schema plugin settings once for changes to take place.

Viewing 1 replies (of 1 total)
  • The topic ‘Post Author URL: can we remove?’ is closed to new replies.