Custom field

#320169
  • Hello,

    Is there a custom field for the SEO Snippet Title and description field?
    I would like to use both the post title and snippet title in various locations in a template.

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting the support, and sorry for any inconvenience that might have been caused due to that.

    I’m not quite sure whether I fully understand the question. But I’ll do my best and please let me know if I misunderstood.

    There are usually two ways in which you can fetch the meta details. Either pull it from the database or fetch it dynamically. The dynamic processing feature is great because it allows the content to be maintained once and used severally.

    Stored in Database: <p><?php echo get_post_meta($post->ID, 'rank_math_title', true); ?></p>
    Dynamic Processing: <p><?php echo RankMath\Post::get_meta( 'title', $post->ID ); ?></p>

    The dynamic processing code sample came from this existing RankMath description code as you can see here:
    https://rankmath.com/kb/filters-hooks-api-developer/#use-global-meta-description

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    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 ‘Custom field’ is closed to new replies.