How to create a meta-description on the main page when it's not listed as page?

#13995
  • Resolved Rogerio Dec
    Rank Math free

    My current homepage is created by the Shop Isle Pro theme and it’s not listed as an actual WordPress page.
    How can I create rich snippets for it?

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math today.

    You can target the page using some PHP code and hook into the following filter to add a custom meta description on your theme’s functions.php file:

    /**
     * Allow changing the meta description sentence from within the theme.
     *
     * @param string $description The description sentence.
     */
    add_filter( 'rank_math/frontend/description', function( $description ) {
    	return $description;
    });

    Looking forward to helping you. Thank you.

    ​​​​​​

    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 ‘How to create a meta-description on the main page when it's not listed as page?’ is closed to new replies.