-
Author
-
October 18, 2015 at 05:22 #82984
Stephanus
ParticipantI’m trying to add a meta description to my home page (which is basically my blog, i.e. under ‘Reading Settings’, I’ve set my front page to display my latest blog posts) but I can’t figure out where/how to do this. As you can see in the attached screenshot, my home page only shows my Site Title and Tagline (which I’ve set under the General Settings).
Please help.
Thank you.
Stephanus
October 18, 2015 at 17:33 #83027sharmstr
ModeratorMost of us use Yoast SEO for that sort of stuff, but you can try this instead…
COPY CODEadd_action( 'wp_head', 'gen_meta_desc' ); function gen_meta_desc() { if ( is_home() ) { echo "<meta name='description' content='This is my custom description.' />"; } }Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionOctober 19, 2015 at 18:42 #83200Stephanus
ParticipantHi Sharmstr,
Thanks for your email.
I still have 2 questions though:
1. Where exactly would I add the code that you sent me?
2. I also use the Yoast SEO plugin, but how do I use the plugin to achieve my goal of adding the meta description to the home page?Kind regards,
Stephanus
October 19, 2015 at 18:56 #83207sharmstr
ModeratorThe code goes in your child theme’s functions.php file.
Refer to the yoast documentation.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionOctober 19, 2015 at 19:44 #83216Stephanus
ParticipantThanks, Sharmstr.
Please would you let me know how to do this using Yoast SEO instead, i.e. where in Yoast SEO I can find the meta description block where I need to add my description?
October 29, 2015 at 17:45 #84908Stephanus
ParticipantHi Sharmstr, please would you let me know how to do this using Yoast SEO instead, i.e. where – in Yoast SEO – I can find the meta description block where I need to add my description?
October 29, 2015 at 18:46 #84921sharmstr
ModeratorHey Stephanus – As mentioned, its in the Yoast documentation: http://kb.yoast.com/article/146-yoast-wordpress-seo-titles-metas-template-variables
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
You must be logged in to reply to this topic.