@alvera_smith
To add meta tags to a WordPress archive page, you can follow these steps:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<?php if (is_category()) : ?> <meta name="description" content="YOUR META DESCRIPTION HERE"> <meta name="keywords" content="YOUR META KEYWORDS HERE"> <?php elseif (is_tag()) : ?> <meta name="description" content="YOUR META DESCRIPTION HERE"> <meta name="keywords" content="YOUR META KEYWORDS HERE"> <?php elseif (is_author()) : ?> <meta name="description" content="YOUR META DESCRIPTION HERE"> <meta name="keywords" content="YOUR META KEYWORDS HERE"> <?php elseif (is_date()) : ?> <meta name="description" content="YOUR META DESCRIPTION HERE"> <meta name="keywords" content="YOUR META KEYWORDS HERE"> <?php elseif (is_search()) : ?> <meta name="description" content="YOUR META DESCRIPTION HERE"> <meta name="keywords" content="YOUR META KEYWORDS HERE"> <?php endif; ?> |
Note that this will add the same meta description and keywords to all archive pages on your site. If you want to have different meta tags for different archive pages, you'll need to modify the code accordingly, either by using different conditionals or by adding custom fields to your archive pages.