Access to user profile meta box

  • I am running Ultimate Member and BBPress on my site and have recently configured Rank Math.

    On the Titles and Meta > Authors section, at the bottom of the screen there is an option to “Add SEO Meta Box for Users”

    It then says “Add SEO Meta Box for user profile pages. Access to the Meta Box can be fine tuned with code, using a special filter hook.”

    How do I configure this? I would like to select the Meta box to include the UM Meta fields I shared in the box above. Is this possible?

    • This topic was modified 2 weeks, 2 days ago by Ben Morrow.
Viewing 15 replies - 1 through 15 (of 16 total)
  • Hello,

    Thank you for contacting Rank Math today.

    If you would like to use the meta fields on your post titles and meta descriptions then you will need to register custom variables by using the following filter:

    /**
     * Filter to add custom variables
     */
    add_filter( 'rank_math/vars/replacements', function( $vars ) {
     return $vars;
    });

    You can also use the following replacement variable to load custom field values from the current post/author:
    %customfield(field-name)%

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Thanks! Where should I put this? I only want this to be on the /user pages. Is that possible?

    Hi Ben,

    Please add the code to your theme’s functions.php file.

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

    Hi, I have tried following the steps above and tested a user profile url
    https://senseistar.com/ja/user/3

    Here is the test page
    https://search.google.com/test/rich-results?id=7a5dgpCmxsa0Mw8jgVC8Tw

    It does not seem to be rendering the custom fields.

    <meta name=”description” content=”(field should be here)先生は先生Star.comに登録しています。(field should be here)の先生

    Is there something I am doing wrong?

    Is anyone able to help with this?

    Hello,

    Thanks for the reply and apologies for the delay.

    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WP logins in the designated Sensitive Data section.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    Temporary Login Without Password

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    WP Security Audit Log

    We really look forward to helping you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    I am hoping to see the custom meta fields reflected when I test a user profile here: https://technicalseo.com/tools/google-serp-simulator/

    Thank you.

    • This reply was modified 2 weeks, 1 day ago by Ben Morrow.

    Hi Ben,

    Thank you for the reply.

    I am afraid that the password does not work. Could you please check this from your end?

    Thank you.

    Sorry, updated!

    Hi Ben,

    Thank you for the reply.

    The new password does not work as well. Could you please share an access token instead using the following plugin:

    Temporary Login Without Password

    Thank you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    The custom fields need to be available on the current page for the %customfield(field-name)% to work on the description field. This does not seem to be the case on your site and these fields do not possess any value.

    As a workaround you will need to ensure that values exist on the text post or you could manually target each page with the following filter:

    /**
     * Allow changing the meta description sentence from within the theme.
     *
     * @param string $description The description sentence.
     */
    add_filter( 'rank_math/frontend/description', function( $description ) {
    	return $description;
    });

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Thank you.

    To clarify, if I add the above filter to fucntions.php, it will allow the fields to be added to the description where I have entered %customfield(field-name)% ?

    Hi,

    It won’t work just by copy/pasting. You have to be able to know a bit of code to make it work. If you are not sure, you can ask your theme provider or authors of Ultimate Member about this.

    If anything is needed from our end, just let us know.

    We will be happy to assist.

    how to activate bb press as from dashboard is not activating?

Viewing 15 replies - 1 through 15 (of 16 total)

You must be logged in to reply to this ticket.