sitelink serach schema

#794941
  • Hello

    I want to add the Sitelinks Search Box Schema to my site. I looked through the instructions you provided as below https://rankmath.com/kb/sitelinks-searchbox-schema/ ,but I can not find the <rank-math.php> file in wordpress admin. The theme name of my site is Blocksy.
    I can find <rank-math.php> file in the file management of my hosting provider. Can I directly add the code
    < /**
    * Filter to enable/disable SearchAction JSON-LD data
    */
    add_filter( ‘rank_math/json_ld/disable_search’, ‘__return_false’ );> to the <rank-math.php>file?

    I shared the image of <rank-math.php> in sensitive data by imgur.com/

    Could you help me resolve this issue?

    Thank you very much

    Vera

Viewing 1 replies (of 1 total)
  • Hello,

    I apologize for the inconvenience you are facing while trying to add the Sitelinks Search Box Schema to your site. If you cannot find the rank-math.php file in your WordPress admin under Appearance → Theme File Editor, and you have located it in the file management of your hosting provider, you can directly add the provided code snippet to the rank-math.php file.

    You can safely add the following code snippet to the rank-math.php file you found in your hosting provider’s file management:

    /**
     * Filter to enable/disable SearchAction JSON-LD data
     */
    add_filter( 'rank_math/json_ld/disable_search', '__return_false' );

    Once you have added the code snippet, make sure to save the changes. After that, you can check for “SearchAction” in the page source or run a Rich Results Test to verify if the Schema Markup has been implemented correctly on all your pages.

    If you encounter any issues or need further assistance, feel free to share the image of the rank-math.php file via imgur.com, and we will be happy to help you resolve the issue.

    Thank you for reaching out, and we appreciate your patience.

    Best regards.

    Sources:
    How to Add Sitelinks Searchbox Schema to All Pages » Rank Math
    Remove All Schema from Product Category Pages » Rank Math
    Using Review Schema Type to Earn Star Ratings » Rank Math
    Enable Rank Math SEO on Elementor Templates » Rank Math
    How to Import JSON-LD Schema Markup With Rank Math » 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.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this ticket.