Hello,
Thank you for contacting the support.
Unfortunately, we do not have a ready variable to get the full content of the post but you can create a custom variable to fetch it.
Here’s a code that registers a custom variable that fetches the current post content:
add_action( 'rank_math/vars/register_extra_replacements', function(){
rank_math_register_var_replacement(
'get_full_content',
[
'name' => esc_html__( 'Gets full cotnent of current post.', 'rank-math' ),
'description' => esc_html__( 'Gets full cotnent of current post.', 'rank-math' ),
'variable' => 'get_full_content',
'example' => 'get_full_content_callback()',
],
'get_full_content_callback'
);
});
function get_full_content_callback() {
return strip_tags(get_post_field('post_content', get_the_ID()));
}
You can follow this guide to add the code:
https://rankmath.com/kb/wordpress-hooks-actions-filters/
After adding the above code, you can use the variable %get_full_content% in the Description field of the Job Posting Schema and see if it gives you the desired output.
You may test the code in a staging website first and if everything seems fine, use it in the live website.
Hope this helps.
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.