Viewing 1 replies (of 1 total)
  • Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @oc-wordpress-web-designer,

    Thank you for contacting the support.

    You can create a custom variable to get the value from the options page. Here is an example:

    add_action('rank_math/vars/register_extra_replacements', function () { rank_math_register_var_replacement( 'options_value', [ 'name' => esc_html__('Options', 'rank-math'), 'description' => esc_html__('Option field value', 'rank-math'), 'variable' => 'options_value', 'example' => options_value_callback(), ], 'options_value_callback' ); }); function options_value_callback() { return get_field('custom', 'option'); //replace custom with the name of the field }

    Once done, you can use the %options_value% variable in the fields of our plugin.

    Here is how to add a filter to your site: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope that helps. Let us know if you need any other assistance.

Viewing 1 replies (of 1 total)
  • The topic ‘ACF Options Field On In SEO Title’ is closed to new replies.