Hello,
We apologize for the issue you are facing. Thank you for raising your concern regarding the integration of Rank Math fields into your markdown version of posts/pages. Below is a piece of code that you can use to retrieve the specified Rank Math fields and append them to your $markdown_content
variable:
$markdown_content .= '**Title:** ' . get_post_meta($post->ID, '_rank_math_title', true) . "n";
$markdown_content .= '**Description:** ' . get_post_meta($post->ID, '_rank_math_description', true) . "n";
$markdown_content .= '**Robots:** ' . get_post_meta($post->ID, '_rank_math_robots', true) . "n";
$markdown_content .= '**OG Title:** ' . get_post_meta($post->ID, '_rank_math_opengraph_title', true) . "n";
$markdown_content .= '**OG Description:** ' . get_post_meta($post->ID, '_rank_math_opengraph_description', true) . "n";
$markdown_content .= '**OG URL:** ' . get_post_meta($post->ID, '_rank_math_opengraph_url', true) . "n";
$markdown_content .= '**OG Site Name:** ' . get_post_meta($post->ID, '_rank_math_opengraph_site_name', true) . "n";
$markdown_content .= '**Article Publisher:** ' . get_post_meta($post->ID, '_rank_math_article_publisher', true) . "n";
$markdown_content .= '**Article Author:** ' . get_post_meta($post->ID, '_rank_math_article_author', true) . "n";
$markdown_content .= '**Article Section:** ' . get_post_meta($post->ID, '_rank_math_article_section', true) . "n";
$markdown_content .= '**OG Image:** ' . get_post_meta($post->ID, '_rank_math_opengraph_image', true) . "n";
$markdown_content .= '**OG Image Alt:** ' . get_post_meta($post->ID, '_rank_math_opengraph_image_alt', true) . "n";
$markdown_content .= '**Local SEO Description:** ' . get_post_meta($post->ID, '_rank_math_local_seo_description', true) . "n";
This code will fetch the respective Rank Math fields and format them for your markdown content. Please ensure that you replace $post->ID
with the appropriate post ID if necessary.
If you have any further questions or need additional assistance, feel free to reply to this ticket. A human agent from the Rank Math Support team will be happy to help you further.
Kind regards!
Sources:
Rank Math SEO Filters and Hooks for Developers – 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.