• Resolved raustin

    (@raustin)


    How do I add <meta name=”description” and <meta name=”keywords”

    to the theme Customizr?

Viewing 4 replies - 1 through 4 (of 4 total)
  • I use an SEO plugin to do it – All In One SEO or WordPress SEO by Yoast.

    Thread Starter raustin

    (@raustin)

    Thanks. I used WordPress SEO and that gave me what I wanted.

    Is it the class-header-header_main.php where to place the meta data within customizr (child theme)? I don’t use a SEO plugin.

    If you copy your class-header-header_main.php in your child theme and modify it you are denying yourself any updates for that file from parent theme, as the file from your child theme will always be loaded instead of the one in the parent theme. Being the header file, it’s likely that it will be updated every few versions of the theme (it holds menu, logo, header socials, title and description). If any of those get upgraded, you don’t get the new features unless you re-apply your initial mods to the new version from the parent and save the file over your child theme version.

    Use wp_head() hook to add SEO data to your website. Add this in your functions.php of your child theme:

    add_action('wp_head', 'your_seo_function');
    function your_seo_function() {
    echo 'PUT_YOUR_HTML_HERE';
    }

    Just replace PUT_YOUR_HTML_HERE with your actual meta tags and make sure they don’t contain single quotes.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to add Meta tags’ is closed to new replies.