[OFFER ALERT!] This Halloween, Get Any Premium Theme for Just $19 [GET IT NOW]
Jump to content

[Rank Math SEO Plugin] Post Description No Working


michalfik
 Share

Recommended Posts

Hi. I see issue a post description is no working. i don't know why a plugin get default post description from a post excerpt and don't use setting from this form:
how to overwrite it and ignore excerpt and use only description from this form?
(post title working correct from this form)
tnx for help.

 

h2z8ndE.png

Link to comment
Share on other sites

  • Support

Hello,

I rechecked your site and, everything seems to be working fine. The priority in which description is added to the posts is:

a) Description inserted in Post Setting's Description field
b) Excerpt Text
c) Description added in Settings
d) Auto-generated description from content

All posts on your site have an excerpt, that's the reason why the description is showing the excerpt text on the frontend. To ignore excerpt, i.e. step 2 and show the description added in Settings, please add the code I shared in my previous reply to your theme's functions.php file.

Hope that helps. Thank you.


🏁Rank #1 on Google With our WordPress SEO Plugin.

Score a 💯on PageSpeed and Dominate Search Rankings.

✏ Editing theme files? Please create a child theme to make your changes update-proof.

Link to comment
Share on other sites

  • Support

Hello,

Thank you for contacting MyThemeShop today.

Please share your login details in the "Sensitive Data" section by editing your first post on this ticket and follow the instructions shown in the screenshot below:
sensitive.jpg

Please make a reply once you update the details, so we get notified.

Looking forward to helping you. Thank you.


🏁Rank #1 on Google With our WordPress SEO Plugin.

Score a 💯on PageSpeed and Dominate Search Rankings.

✏ Editing theme files? Please create a child theme to make your changes update-proof.

Link to comment
Share on other sites

  • Support

Hello,

I see the issue on your site but unfortunately, I could not recreate this issue on my setup. Also on your site, I see the issue only on the Article Posts, on pages, it seems to be working fine.

Can you please check if there are any errors logged in debug.log file in wp-content/ folder?

For now, to temporarily fix it on your site, I added below code to your active theme's funcitons.php file:

add_filter( 'rank_math/frontend/description', function( $desc ) {
	if( is_singular() ) {
		global $post;
		$desc = get_post_meta( $post->ID, 'rank_math_description', true );
		if( ! $desc ) {
			$settings = get_option( 'rank-math-options-titles' );
			$desc = $settings["pt_{$post->post_type}_description"];
			$desc = RankMath\Helper::replace_vars( $desc );
		}
	}

	return $desc;
});

The posts now show the description added in Settings.

The code I added fix the issue but please do share the error log information in the Sensitive Data Section so we can further debug the issue on your site as we are not able to reproduce it on our setup.

Looking forward to helping you. Thank you.


🏁Rank #1 on Google With our WordPress SEO Plugin.

Score a 💯on PageSpeed and Dominate Search Rankings.

✏ Editing theme files? Please create a child theme to make your changes update-proof.

Link to comment
Share on other sites

  • Support

Hello,

I rechecked your site and, everything seems to be working fine. The priority in which description is added to the posts is:

a) Description inserted in Post Setting's Description field
b) Excerpt Text
c) Description added in Settings
d) Auto-generated description from content

All posts on your site have an excerpt, that's the reason why the description is showing the excerpt text on the frontend. To ignore excerpt, i.e. step 2 and show the description added in Settings, please add the code I shared in my previous reply to your theme's functions.php file.

Hope that helps. Thank you.


🏁Rank #1 on Google With our WordPress SEO Plugin.

Score a 💯on PageSpeed and Dominate Search Rankings.

✏ Editing theme files? Please create a child theme to make your changes update-proof.

Link to comment
Share on other sites

  • Support

Hello,

This is not an issue, that's how Rank Math adds the description. If a description is not added in the form then it uses the excerpt content and if there is no content in excerpt then it uses the default description added in settings. To prevent the plugin from using excerpt content you will have to add the filter code I gave you before. There is no other option since it's not an issue.

Hope that helps. Please let us know if there is anything else.

Thank you.


🏁Rank #1 on Google With our WordPress SEO Plugin.

Score a 💯on PageSpeed and Dominate Search Rankings.

✏ Editing theme files? Please create a child theme to make your changes update-proof.

Link to comment
Share on other sites

ok. i see how to fix it in global way.

a) Description inserted in Post Setting's Description field
b) Excerpt Text
c) Description added in Settings
d) Auto-generated description from content

is a wrong. first

a) - after this need to be c) - after this b) and on the end d)

people use Excerpt to provide various information from post. (some templates allow it) so i think will be a better to move point b) under the c) tnx.

Link to comment
Share on other sites

  • Support

Hello,

Thank you for your valuable suggestion, it means a lot to us.

We will see what we can do with it.

If there is anything, please let us know and we are here to help.


🏁Rank #1 on Google With our WordPress SEO Plugin

Score a 💯on PageSpeed and Dominate Search Rankings.

✏ Editing theme files? Please create a child theme to make your changes update-proof.

Link to comment
Share on other sites

  • Support

Hello,

Glad that everything is working as intended.

We will see if we can introduce filters in the future so it will be easier to modify such conditions.

If you need help with anything else, please feel free to open a new support ticket. Thank you.


🏁Rank #1 on Google With our WordPress SEO Plugin

Score a 💯on PageSpeed and Dominate Search Rankings.

✏ Editing theme files? Please create a child theme to make your changes update-proof.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...