Support

Account

Home Forums General Issues Adding seo title via acf with if clause in function.php

Helping

Adding seo title via acf with if clause in function.php

  • Hello,

    I added meta description and keywords using this tutorial I found online.
    The title my pages have currently come from the post-/page-titles…how do I make the titles come from a custom field?
    Link: http://docs.3rddesign.com/adding-meta-tags-to-your-wordpress-site-using-acf/

    Actually I don’t know how the current title tag is added…I need a line into to functions.php which overwrites the current title tag.

    I hope I could explain it clearly, please let me know if you need further information.

  • I generally use this https://wordpress.org/plugins/autodescription/, there are other SEO plugins as well but I won’t mention the most popular to provide another link to it.

    The tutorial you’re looking at will work if you remove title support from your theme. Somewhere in your theme you should find a line that looks like add_theme_support( 'title-tag' );, comment it out and WP might stop adding the title tag.

    You can also look at the seo plugins and see hoe they do it. I’m not sure and this is more of a general WP question and an ACF question.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Adding seo title via acf with if clause in function.php’ is closed to new replies.