- This topic has 11 replies, 2 voices, and was last updated 5 months ago by
David.
-
AuthorPosts
-
August 17, 2018 at 4:54 am #651672
Brett
My client wants to add Meta Keywords to each individual pages. It appears like Yoast removed that from their plugin. Is this something that ACF would be good to use? If so, would I add some sort of code to functions.php?
Thank you!
GP Premium 1.7.1August 17, 2018 at 9:22 am #652009Tom
Lead DeveloperLead DeveloperHi there,
You could, then you’d just need to output the custom field in the
wp_head
hook like this.You could also try a plugin like the SEO Framework.
Yoast should technically still have the option – maybe it’s just turned off by default?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentAugust 17, 2018 at 10:23 am #652057Brett
I understand your comment about using the hook, but was there supposed to have been a piece of code there to echo out the ACF string for each page?
August 17, 2018 at 6:18 pm #652308Tom
Lead DeveloperLead DeveloperYes, you’d likely need to use their
get_field()
function: https://www.advancedcustomfields.com/resources/get_field/So something like:
<?php $keywords = get_field( 'your_key' ); if ( $keywords ) { echo '<meta name="keywords" value="' . $keywords . '" />'; } ?>
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentAugust 23, 2018 at 11:48 am #658207Brett
That worked. Thank you!!!
August 23, 2018 at 5:29 pm #658435Tom
Lead DeveloperLead DeveloperYou’re welcome 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentDecember 16, 2021 at 4:27 am #2050821srimali senn
Hi can you please let me know where do i insert key words in the following code, i want to add meta keywords in generatepress hook
<?php
$keywords = get_field( ‘your_key’ );
if ( $keywords ) {
echo ‘<meta name=”keywords” value=”‘ . $keywords . ‘” />’;
}
?>Eg: my key words are red, blue, yellow, green
December 16, 2021 at 5:52 am #2050887David
StaffCustomer SupportHi there,
the original topic owner is using the ACF Plugin. Are you using ACF?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/December 17, 2021 at 6:38 am #2051942srimali senn
I am not using ACF, I want to insert meta keywords to my wordpress website
December 17, 2021 at 7:55 am #2052141David
StaffCustomer SupportAre you using an SEO plugin? As those generally provide Keyword and Description Meta fields.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/December 17, 2021 at 7:58 am #2052144srimali senn
I use Yoast unpaid version, it has meta key phrase, is it meta key words?
December 17, 2021 at 8:04 am #2052149David
StaffCustomer SupportThis article from Yoast explains Keywords ( And why no one should use them ):
https://yoast.com/meta-keywords/
And this article includes a reference to Meta Descriptions and keyphrase:
https://yoast.com/meta-descriptions/#keyphrase-in-meta-description
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.