mplusplus
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to change meta description ONLY if the page slug is this?@joyously
Sorry for late reply. Actually, I did paste ALL of the code that you gave me as it is, and it does NOT actually print anything at all, on any page.Please let me know if you want me to try something else?
Thanks.
— Your entire code is as below —–function my_add_meta_description() { if (is_single("some-slug")) { $description = esc_attr("custom description"); echo '<meta name="description" content="' . $description . '" />' . "\n"; } } add_action( 'wp_head', 'my_add_meta_description');
Forum: Plugins
In reply to: [Yoast SEO] For dynamic pages, how to use Yoast to generate JSON-LD?Hi
So Yoast does generate a generic schema, which is good. But I need to customize it and provide specific information (based on the URL). Of course, it will NOT be possible for Yoast to read my mind, so if there is a way that it can allow me to pass some data to it to include in JSON-LD, that will be great.
I copy paste the page data here:
<script type=”application/ld+json” class=”yoast-schema-graph”>{“@context”:”https://schema.org”,”@graph”:[{“@type”:”WebSite”,”@id”:”https://test.testsite.com/#website”,”url”:”https://test.testsite.com/”,”name”:”Test Site”,”description”:”Just another WordPress site”,”potentialAction”:[{“@type”:”SearchAction”,”target”:”https://test.testsite.com/?s={search_term_string}”,”query-input”:”required name=search_term_string”}],”inLanguage”:”en-US”},{“@type”:”WebPage”,”@id”:”https://test.testsite.com/car-sellers-san-francisco-ca/#webpage”,”url”:”https://test.testsite.com/car-sellers-san-francisco-ca/”,”name”:”!!! car-sellers-san-francisco-ca -“,”isPartOf”:{“@id”:”https://test.testsite.com/#website”},”datePublished”:”2020-10-13T05:34:42+00:00″,”dateModified”:”2020-10-23T22:28:45+00:00″,”inLanguage”:”en-US”,”potentialAction”:[{“@type”:”ReadAction”,”target”:[“https://test.testsite.com/car-sellers-san-francisco-ca/”%5D}]}]}</script>
<!– / Yoast SEO plugin. –>Thanks.
Hi,
Actually, not all users use Social Login, I still have my regular login on the page which bots can target. Is there any way to protect my login form?
Thanks.
Forum: Fixing WordPress
In reply to: How to change meta description ONLY if the page slug is this?So, I was able to remove the error using
‘if (is_single(“some-slug”))’However, this code again causes other pages to have no meta tag at all. The same issue that I have using my own code as per my original post.
I am still looking for a way so the meta description changes for “some-slug”, BUT NOT for other pages.
Thanks.
Thanks so much.
- This reply was modified 4 years, 5 months ago by mplusplus.
Forum: Fixing WordPress
In reply to: How to change meta description ONLY if the page slug is this?Hi @wpcoworker
Sorry, plugins will not work, I need the way to do it with PHP code.
Any other thoughts will be appreciated.Thank you.
Forum: Fixing WordPress
In reply to: On my “/blog” page, how to show only title and summary of posts?Hi @t-p
I am using Twenty Twenty theme and it shows ALL text of ALL articles on one page.
I wonder how to show only links with a summary instead?Thanks.
Forum: Fixing WordPress
In reply to: Changing text of default WordPress emails?Hi Salman,
That is great to know! Also, the theme’s functions.php gets overwritten every time there is a theme update. Are there any other ways to achieve this, so changes are not overwritten with theme upgrades?
Thanks.
Forum: Fixing WordPress
In reply to: Changing text of default WordPress emails?@sulmanpucit
Hi SalmanThanks, buddy, btw how can I use these filters, please? Is there any link for steps or tutorial?
Thanks so much.
@t-p Thanks for that tip, yup it was a conflict with a plug-in.
Thanks.
Forum: Fixing WordPress
In reply to: Changing Post URLs without changing URLs for Pages?@davidksmiths
Changing Settings > Permalinks, changed the URL of posts, but not pages, so it worked fine.Thanks.
Forum: Fixing WordPress
In reply to: Changing Post URLs without changing URLs for Pages?@pidengmor Thanks for the tip, it worked.
Thanks all for your time and help.
??Forum: Fixing WordPress
In reply to: Changing Post URLs without changing URLs for Pages?Hi Fahim,
That will change the URLs for Pages as well, and I need to change URLs for ONLY Posts.
Any other thoughts are welcome.
Thank you