Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Rank Math SEO

    (@rankmath)

    Hello @espacemusculation

    Thank you for contacting the support.

    Please add the following filter to change the author name by adding the code in your theme’s functions.php file:

    add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
    	if ( isset( $data['richSnippet']['author'] ) ) {
    		$data['richSnippet']['author']['name'] = $data['richSnippet']['author']['name'] . 'ADD_LAST_NAME_HERE';
    	}
    	return $data;
    }, 99, 2);

    Hope that helps.

    Thread Starter espacemusculation

    (@espacemusculation)

    @rankmath

    thanks for trying to help me.
    but I don’t want to do that.

    I want to add “jobTitle”

    http://schema.org/jobTitle

    I have modified my theme to add the profession next to the name as you can see here :

    https://www.docteur-fitness.com/est-il-plus-avantageux-de-diviser-votre-entrainement-en-plusieurs-seances-par-jour

    –> Jimmy THAI, Science Journalist

    I cheated a little. To display the profession, I use the “last_name” input in the WordPress profile.

    (because I don’t have the skills to create a new input etc.).

    Now I’d just like to add it to the “json.”

    Currently I have this

    author
    @type Person
    name Jimmy THAI

    Can you help me add “jobTitle”: $last_name

    I don’t know if you get the idea…

    Many thanks for help

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

The topic ‘json jobtitle’ is closed to new replies.