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.
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:
https://wordpress.org/plugins/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):
https://wordpress.org/plugins/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 4 years, 10 months 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.
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:
https://wordpress.org/plugins/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?
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.