Remove author’s name from page code

#905189
Viewing 1 replies (of 1 total)
  • Hello,

    We apologize for the issue you are facing with the author’s name appearing in the HTML code. To remove the author’s name from the schema markup generated by Rank Math, you can use a filter to modify the JSON-LD data. Here’s how you can do it:

    Code Snippet to Remove Author Name

    You can add the following code snippet to your theme’s rank-math.php file:

    add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
        if ( isset( $data['BlogPosting'] ) ) {
            unset( $data['BlogPosting']['author']); // Remove author information
        }
        return $data;
    }, 99, 2);

    This code checks if the BlogPosting schema is present and removes the author property from it.

    How to Add the Code

    1. Navigate to WordPress Dashboard → Appearance → Theme File Editor.
    2. Open the rank-math.php file.
    3. Paste the above code snippet at the end of the file.
    4. Click Update File to save your changes.

    Important Note

    Please ensure that you have a backup of your site before making any changes to the theme files. This will help you restore your site in case anything goes wrong.

    If you have any further questions or need assistance, feel free to reply to this ticket, and a human agent from our support team will assist you further!

    Sources:
    Remove Organization Schema from Your Website » Rank Math

    This is an automated reply from Rank Math Support Bot. If you need further assistance, please reply to this topic and a human support agent will reply to you shortly.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘Remove author’s name from page code’ is closed to new replies.