Support » Themes and Templates » [Theme: Twenty Eleven] – meta description on archives

  • Resolved ifingers

    (@ifingers)


    Hi all,

    I am trying to modify the meta descriptions for some archive pages for some custom post types I have in a Twenty Eleven child theme.

    The meta descriptions for standard pages and posts are ok, as well as for the static home page. However my CPT archive pages show a meta description of just one CPT post from the archive. Any ideas on how to fix this? Looked through the functions.php file but doesn’t to be something in there. But there is definitely some mojo going on that I don’t understand.

    Thanks
    Rich

Viewing 1 replies (of 1 total)
  • Thread Starter ifingers

    (@ifingers)

    Well just in case this helps someone else…

    I added conditional code in my header.php file like this:

    <?php } else if ( 'my-custom-post-type' == get_post_type() && is_archive()) { ?>
    <meta name="description" content="My wonderful SEO friendly description goes here..." />
    <?php }

    Not particularly elegant, but it works!

Viewing 1 replies (of 1 total)
  • The topic ‘[Theme: Twenty Eleven] – meta description on archives’ is closed to new replies.