-
When i share news posts on Facebook i want those show no post description. check the screenshot below. I want them to like the screenshot. Yoast used to do that. after migration from yoast my posts started showing description again.
which setting should I turn off?
https://imb.co/NW75zGL
-
Hello,
Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.
Your attached image seems to not be available but as far as I understand, you want to disable showing the Facebook title and description added by Rank Math.
You could do it by adding the following code at the end of the functions.php file in your current theme:
add_filter( "rank_math/opengraph/facebook/og_title","__return_false"); add_filter( "rank_math/opengraph/facebook/og_description","__return_false");
Looking forward to helping you. Thank you.
​​​​​​​
Sorry for that. please check this link https://ibb.co/NW75zGL
I want my social share like the screenshot. how to do that. it should only show title and site name. check the image please-
This reply was modified 5 years, 2 months ago by
.
Hello,
If you want to just display the title you could leave the description empty in the Social section, just as I show you in the following screencast: https://i.rankmath.com/Sbnx3c
Or add the following code at the end of your current theme’s function.php file:
add_filter( "rank_math/opengraph/facebook/og_description","__return_false");
Looking forward to help you.
tried adding the following code. not working still shows the description. check the link https://ibb.co/KwnJHXM
also tried changing ‘Single Post Description’ under post types setting in rank math but it reverts back to %excerpt% every time I save. plus you gave me screencast of a single post. which is hard to set for every post. I want to set the setting for all the posts at a time.-
This reply was modified 5 years, 2 months ago by
.
Hello,
Thank you for contacting Rank Math today.
I have tested the following function and it works from my end. Please add it to your functions.php and let us know how it goes.
/** * Allow developers to change the content of specific social meta tags. * * The dynamic part of the hook name. $network, is the network slug * and $og_property, is the property which we are outputting. * * @param string $content The content of the property. */ add_filter( "rank_math/opengraph/facebook/og_description", function( $content ) { $content=''; return $content; });
Looking forward to helping you. Thank you.
​​​​​​
it still shows something. but in yoast it used to show only title. is there any way to get this setting back?
Hello,
The code my colleague provided should remove the description. Did you check this on Facebook Debugger? Can you give us link to the article where Facebook shows description even after adding the code?
Looking forward to helping you.
Hello,
Thank you for the follow up.
​​​​​​
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?
Thank you.
Hello,
Thank you for contacting Rank Math today.
I have checked your site and the code is working fine, however it seems one of your plugins or your theme is adding the description automatically on the debugger since I can’t find the added description in the page source code. The description is there even when Rank math is deactivated. Please test your plugins and theme to figure out which one is adding the description.
Please note that this might be the actual end result, if you test your link here: https://metatags.io, you will see the facebook description is not shown.
Looking forward to helping you. Thank you.
​​​​​​
but when yoast was enabled with these existing plugins fb didn’t show description.
I tried deactivating all the plugins, yet it shows descriptions.
also after installing rank math permalinks structure not working
default permalink is post name yet it creates the link like this, ex: https://mcjnews.com/10151-2/
why?Hello,
Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.
This seems to be an issue with facebook forcing a description by taking an excerpt form your page. If you test your post here: heymeta.com or other social preview tools, there is no description returned. Here is a screenshot: https://i.rankmath.com/eEGKQm
On the issue with your permalinks, this seems to be your permalink setting under Rank math on-page general metabos as shown here: https://i.rankmath.com/N5jDCs
Looking forward to helping you. Thank you.
​​​​​​​
By default it creates that permalink, how to stop that? thanks for all the help.
-
This reply was modified 5 years, 2 months ago by
You must be logged in to reply to this ticket.