WordPress.org

Ready to get started?Download WordPress

Forums

Removed code from header, now no keywords showing (3 posts)

  1. Barnez
    Member
    Posted 1 year ago #

    Hi,

    I use the Academica theme for my site http://www.englishlc.com. I also have Yoast WordPress SEO installed.

    A few days ago I posted a request for what code to remove from my header to avoid duplicate meta descriptions from appearing in search engine listing.

    After some advice, the following code was removed

    <title><?php wp_title(''); ?><?php if(wp_title('', false)) { echo ' | '; } ?><?php bloginfo('name'); if(is_home()) { echo ' | '; bloginfo('description'); } ?></title>
    <?php if (is_single() || is_page() ) : if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <meta name="description" content="<?php the_excerpt_rss(); ?>" />
    <?php csv_tags(); ?>
    <?php endwhile; endif; elseif(is_home()) : ?>
    <meta name="description" content="<?php bloginfo('description'); ?>" />
    <?php endif; ?>

    and replaced with

    <title><?php wp_title(''); ?></title>

    This resolved the issue, but now I find that I have no keywords appearing in the header information. While I am aware that Google does not pay too much attention to keywords, I believe that other search engines do. Therefore, I am wondering if I can reinstate a line or several lines of the original code to return the keyword information to the header.

  2. johnbhartley
    Member
    Posted 1 year ago #

    <?php csv_tags(); ?> is what you need to put back in for the keywords. Read here for more info.

  3. Barnez
    Member
    Posted 1 year ago #

    Many thanks for your response. I've read the linked article in your reply, and am aware that I shouldn't get too hung up on keywords, but I still would like to reinstate them as I feel the code needed to enable the same information in tags is beyond me at this point.

    So, I placed the line you recommended back into the header as below.

    <title><?php wp_title(''); ?></title>
    <?php csv_tags(); ?>

    The meta tags are still not showing up, I either see nothing or a comma "," as the keyword on each page. I've tried deleting the cache on the browser and WordPress, and reloading sample webpages, but the original keywords that are still found in each page's Yoast SEO section are not showing up.

    Site is http://englishlc.com

Topic Closed

This topic has been closed to new replies.

About this Topic