Snippets with placeholder

#23115
  • Resolved Jonathan
    Rank Math free

    Hello, placeholders can be inserted for the “Description” or “Title” fields in the snippets. Is it also possible to draw a text on the page and then insert it automatically as a placeholder? So that the information (for example for a recipe) does not have to be entered twice? Thank you!

Viewing 1 replies (of 1 total)
  • Michael Davis
    Rank Math pro

    Hello,

    Thank you for contacting Rank Math today.

    This feature is not available in the plugin but you can come up with some custom logic to override the schema data with the values from your recipe plugin. This can be achieved with the help of the following filter on your functions.php file:

    /**
     * Filter to Short-circuit Schema if a 3rd party is interested in generating their own data.
     * Replace $schema_type with schema name like article, review, etc.
     * @param array $entity Snippet Data
     * @return array
     */
    add_filter( "rank_math/snippet/rich_snippet_{$schema_type}", function( $entity ) {
     return $entity;
    });

    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 ‘Snippets with placeholder’ is closed to new replies.