Title: Removing &quot;abandoned code&quot;
Last modified: August 22, 2016

---

# Removing "abandoned code"

 *  Resolved [Datadama](https://wordpress.org/support/users/datadama/)
 * (@datadama)
 * [11 years ago](https://wordpress.org/support/topic/removing-abandoned-code/)
 * How do I remove parts of an old meta tag?
    On my blog’s front page I see some“
   leftovers” from a meta tag. Looks like: “> “> When using inspect tools in the
   browser (html) it seems to be located in the body of my blog page (home page),
   but I have not been able to locate it in any php-pages.
 * _[ Moderator note: code fixed. Please wrap code in the backtick character or 
   [use the code button](http://codex.wordpress.org/Forum_Welcome#Posting_Code).]_
 *     ```
       <body class="blog logged-in admin-bar customize-support">
           ">
           <meta keywords"="" content="<meta name=" name="keywords"></meta>
           ">
       ```
   
 * How do I find (and destroy!) these annoying leftovers?

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [11 years ago](https://wordpress.org/support/topic/removing-abandoned-code/#post-5947914)
 * does this only show in the blog’s front page?
 * the `<body>` tag is usually in **header.php** of a theme;
    but could be different…
   what theme are you using?
 * does the problem persist if you temporarily switch to the default theme Twenty
   Fifteen?
    does the problem persist if you temporarily deactivate **all **plugins?
 *  Thread Starter [Datadama](https://wordpress.org/support/users/datadama/)
 * (@datadama)
 * [11 years ago](https://wordpress.org/support/topic/removing-abandoned-code/#post-5947917)
 * It only appears on the blog’s front page.
    Cannot be found in header.php. Using
   my own themes, this is the first time I’ve not been able to locate error like
   this one. The problem accured before adding any plugins.
 * I have tried to use another theme, deleted my theme and reinstalled it, – no 
   use.
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [11 years ago](https://wordpress.org/support/topic/removing-abandoned-code/#post-5947923)
 * > It only appears on the blog’s front page.
 * check the files **index.php**, **front-page.php**, **home.php **if they exist…
 * also check **functions.php** or any existing other files with functions.
 * if the stray output disappears while you are using the default theme Twenty Fifteen,
   the code is probably in one of your theme’s files.
 * > Using my own themes
 * are these based on any commonly available themes?
 *  Thread Starter [Datadama](https://wordpress.org/support/users/datadama/)
 * (@datadama)
 * [11 years ago](https://wordpress.org/support/topic/removing-abandoned-code/#post-5947943)
 * I’ll check the files suggested.
    Using sort of templates based themes, but not
   commonly available. It’s not a problem with the themes it selves. Used them a
   lot. This has to do with me removing a meta tag before publishing, but somehow
   these useless little tag-leftovers was left behind…
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [11 years ago](https://wordpress.org/support/topic/removing-abandoned-code/#post-5947958)
 * > me removing a meta tag before publishing
 * which file did you edit to remove the meta tag? or how did you do it?
 * does the problem also show if you are logged-off?
 * what is the full code of **header.php** (assuming that that file contains the
   body tag)?
 * ar you using any cache plugins?
 * can you provide a live link to the effected site?
 *  Thread Starter [Datadama](https://wordpress.org/support/users/datadama/)
 * (@datadama)
 * [11 years ago](https://wordpress.org/support/topic/removing-abandoned-code/#post-5947989)
 * Problem was there before installing any plugins. Only Jetpack installed.
 * The site:
    [http://www.sunndal-fjellstyre.no/](http://www.sunndal-fjellstyre.no/)
 * header.php:
 *     ```
       <?php global $wp_locale;
       if (isset($wp_locale)) {
       	$wp_locale->text_direction = 'ltr';
       } ?>
       <!DOCTYPE html>
       <html <?php language_attributes(); ?>>
       <head>
       <meta charset="<?php bloginfo('charset') ?>" />
       <title><?php wp_title( '|', true, 'right' ); ?></title>
   
       <meta name="description" content="<?php if ( is_single() ) {
               single_post_title('', true);
           } else {
               bloginfo('name'); echo " - "; bloginfo('description');
           }
           ?>" />
   
       <meta name="viewport" content="initial-scale = 1.0, maximum-scale = 1.0, user-scalable = no, width = device-width" />
       <!--[if lt IE 9]><script src="https://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
   
       <link rel="stylesheet" href="<?php bloginfo('stylesheet_url') ?>" media="screen" />
       <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
       <?php
       remove_action('wp_head', 'wp_generator');
       if (is_singular() && get_option('thread_comments')) {
       	wp_enqueue_script('comment-reply');
       }
       wp_head();
       ?>
       </head>
       <body <?php body_class(); ?>>
   
       <div id="main">
   
       <?php if(theme_has_layout_part("header")) : ?>
       <header class="header<?php echo (theme_get_option('theme_header_clickable') ? ' clickable' : ''); ?>"><?php get_sidebar('header'); ?></header>
       <?php endif; ?>
   
       <div class="pageslider">
   
            <div class="shapes">
                   </div>
       <div class="slider slidecontainerpageslider" data-width="1920" data-height="250">
           <div class="slider-inner">
       <div class="slide-item slidepageslider0">
   
       </div>
   
           </div>
       </div>
       <div class="slidenavigator slidenavigatorpageslider" data-left="1" data-top="1">
       <a href="#" class="slidenavigatoritem"></a>
       </div>
   
       </div>
       <div class="sheet clearfix">
                   <div class="layout-wrapper">
                       <div class="content-layout">
                           <div class="content-layout-row">
                               <div class="layout-cell content">
       ```
   
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [11 years ago](https://wordpress.org/support/topic/removing-abandoned-code/#post-5948009)
 * the stray output comes from this section:
 *     ```
       <meta name="description" content="<meta name="description" content="Sunndal fjellstyre er et kommunalt valgt styre for Sunndal statsallmenning.">">
       <meta name="keywords" content="<meta name="keywords" content="Sunndal, fjellstyre, friluftsliv, jakt, fiske, reinsjakt, småviltjakt, ferieklubb, fjell, statsallmenning, hytteleie, hytter, fjellfiske">">
       <meta name="author" content="Sunndal Fjellstyre">
       ```
   
 * it seems that is the section used by ‘wp_head()’ to add actions etc; i.e. this
   is likely influenced by something in the functions files.
    could be from some
   theme options, just with the wrong content entered…
 * the section after the body tag is fine:
 *     ```
       <body class="blog">
   
       <div id="main">
   
       <header class="header">
       ```
   
 *  Thread Starter [Datadama](https://wordpress.org/support/users/datadama/)
 * (@datadama)
 * [11 years ago](https://wordpress.org/support/topic/removing-abandoned-code/#post-5948042)
 * I removed an empty spaces in the header.php, between those meta-tags – and now
   the page looks fine. Not sure why, but … it’s friday.
    Thank you for all your
   help!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Removing "abandoned code"’ is closed to new replies.

## Tags

 * [debugging](https://wordpress.org/support/topic-tag/debugging/)
 * [html](https://wordpress.org/support/topic-tag/html/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 2 participants
 * Last reply from: [Datadama](https://wordpress.org/support/users/datadama/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/removing-abandoned-code/#post-5948042)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
