Custom post single description not populating

#33107
  • Resolved Paul Clarke
    Rank Math free

    Hi,

    Property %customterm(availability)% in %title% works fine in a custom post title but Property %customterm(availability)% in %title% %sep% %excerpt% will not work in the custom post single description.

    Please can you let me know how to fix?

    Thank you!

    Paul

    • This topic was modified 4 years, 2 months ago by Paul Clarke. Reason: Title was not very good description of issue
Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello,

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

    The %customterm(taxonomy-name)% variable can only be used on a post where the custom taxonomy is in use and the taxonomy contains a term selection.

    Could you please share some screenshots if this is how this has been set up on your site?

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Hi Michael,

    Thank you for your reply.

    I have two screenshot links below for you (could not see how to attach).

    The title works fine and the correct data is pulled through. The description only pulls through the excerpt. I have tested this only using the %sep% in the description field and still the excerpt is show so I don’t think the issue related to anything custom – it is just you can not set the description field to anything other than excerpt at the moment.

    Thank you

    Paul

    null

    null

    Todd
    Rank Math free

    Hi Paul,

    We are extremely sorry about this and for the late response. Your reply was stuck in spam due to the use of links in your reply.

    Can you please confirm if you have used a custom excerpt in the single property?

    If that doesn’t work, we might need to take a closer look at the settings. Please 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:
    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?

    Thank you.

    Hello,

    Thank you for contacting Rank Math today.

    The post excerpt takes higher priority than the global meta settings that have been configured in the plugin.

    To change this behavior and use the global settings, please add the following code to your theme’s functions.php file via FTP since I am unable to make changes to your theme files using the Theme editor:

    /**
     * Allow changing the meta description sentence from within the theme.
     *
     * @param string $description The description sentence.
     */
    add_filter( 'rank_math/frontend/description', function( $description ) {
    	if(is_singular('property')){
    		$value = RankMath\Helper::get_settings( 'titles.pt_property_description' );
            return '' !== $value ? RankMath\Helper::replace_vars( $value, [] ) : '';
    	}
    	return $description;
    });

    This will change the description on the frontend, please inspect your page source to check if it is working as expected after adding the snippet.

    Looking forward to helping you. Thank you.

    ​​​​​​

    Thank you Michael,

    That code works great. I have been able to construct a much more helpful description.

    I am sure you know this already but the description box would not display a combination of custom fields and the excerpt, but that is ok for me anyway.

    Thanks again!!!!

    Paul

    Todd
    Rank Math free

    Hi Paul,

    We are so glad to be of help. We are always here if you need us in the future.

    Hey, if it isn’t too much to ask for – would you mind leaving us a review here?

    https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post

    It only takes a couple of minutes but helps us tremendously.

    It would mean so much to us.

    Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)

The ticket ‘Custom post single description not populating’ is closed to new replies.