You must be logged in to post Login Register
Search Forums:


 






Wildcard Usage:
*    matches any number of characters
%    matches exactly one character

Remove broken link

UserPost

8:47 pm
July 20, 2010


Julia Walkden

Member

posts 11

Hi Philip,

There are two broken links in my website. I can see them in the source code, in the meta details, but can't work out how to delete them. 

http://www.moringa-tree.com/feed/

http://www.moringa-tree.com/co…..ents/feed/

Can you help me with this?

Thanks,

Julia

9:42 pm
July 20, 2010


Philip Light

Admin

posts 57

Post edited 2:45 am – July 21, 2010 by Philip Light


Heya,

Those links are for your RSS feeds, which are pulled from Posts and the Comments users might leave on your Posts.  In your case, it seems you are only using Pages, so it's not a bad idea to remove those links, unless you plan on using Posts at some point as well.

To remove them, you will need to dig into your Theme files a little bit and look for the header.php file, where these links are usually coded in.  To do so, you can use FTP or via your Admin Center under Appearence > Editor, then click on the header.php file, then erase the lines that you are seeing. It's likely to look a bit different (based on the theme), there but you should be able to find it.

Make sure you get rid of the whole line, but nothing else, as otherwise you might have a random character on your page or worse.

Also, noticed that your onsite Site Map is a bit messed up.  You've made an XML Site Map, which is for things like Google's Webmaster Tools, but then pasted the XML on your site.  You want instead to use a Site Map plugin that creates straight HTML on your sitemap page and actual links to every page.  I personally use this plugin, http://wordpress.org/extend/pl…..generator/ for that.

Best of luck!

Philip Light

9:24 pm
July 21, 2010


Julia Walkden

Member

posts 11

Hi Philip,

Many thanks for the advice re the SEO and sitemap plugins. The Dagon Design plugin works really well. I've got the SEO plugin installed and have yet to discover how to do individual pages. I tried looking for the lines to delete to get rid of the broken links in the header.php, but nothing looks familar, unless it's the link rel pingback line? I'll paste the code below and perhaps you can see what I need to delete.

Thanks again for your help . . .

Julia

 

?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="google-site-verification" content="R36vYYRuU5dVWkGg_ajBwIR7L0F6gV8xTsZG-2TG15I" />
<title><?php
/*
* Print the <title> tag based on what is being viewed.
* We filter the output of wp_title() a bit — see
* twentyten_filter_wp_title() in functions.php.
*/
wp_title( '|', true, 'right' );
?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php
/* We add some JavaScript to pages with the comment form
* to support sites with threaded comments (when in use).
*/
if ( is_singular() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
/* Always have wp_head() just before the closing </head>
* tag of your theme, or you will break many plugins, which
* generally use this hook to add elements to <head> such
* as styles, scripts, and meta tags.
*/
wp_head();
?>
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-10106980-12']);
  _gaq.push(['_trackPageview']);
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>
</head>
<body <?php body_class(); ?>>
<div id="wrapper" class="hfeed">
<div id="header">
<div id="masthead">
<div id="branding" role="banner">
<?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>
<<?php echo $heading_tag; ?> id="site-title">
<span>
<a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
</span>
</<?php echo $heading_tag; ?>>
<div id="site-description"><?php bloginfo( 'description' ); ?></div>
<?php
// Check if this is a post or page, if it has a thumbnail, and if it's a big one
if ( is_singular() &&
has_post_thumbnail( $post->ID ) &&
( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
$image[1] >= HEADER_IMAGE_WIDTH ) :
// Houston, we have a new header image!
echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
else : ?>
<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
<?php endif; ?>
</div><!– #branding –>
<div id="access" role="navigation">
 <?php /*  Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?>
<div class="screen-reader-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyten' ); ?>"><?php _e( 'Skip to content', 'twentyten' ); ?></a></div>
<?php /* Our navigation menu.  If one isn't filled out, wp_nav_menu falls back to wp_page_menu.  The menu assiged to the primary position is the one used.  If none is assigned, the menu with the lowest ID is used.  */ ?>
<?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
</div><!– #access –>
</div><!– #masthead –>
</div><!– #header –>
<div id="main">

?><!DOCTYPE html><html <?php language_attributes(); ?>><head><meta charset="<?php bloginfo( 'charset' ); ?>" /><meta name="google-site-verification" content="R36vYYRuU5dVWkGg_ajBwIR7L0F6gV8xTsZG-2TG15I" />
<title><?php /* * Print the <title> tag based on what is being viewed. * We filter the output of wp_title() a bit — see * twentyten_filter_wp_title() in functions.php. */ wp_title( '|', true, 'right' );
?></title><link rel="profile" href="http://gmpg.org/xfn/11" /><link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" /><link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" /><?php /* We add some JavaScript to pages with the comment form * to support sites with threaded comments (when in use). */ if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' );
/* Always have wp_head() just before the closing </head> * tag of your theme, or you will break many plugins, which * generally use this hook to add elements to <head> such * as styles, scripts, and meta tags. */ wp_head();?><script type="text/javascript">
  var _gaq = _gaq || [];  _gaq.push(['_setAccount', 'UA-10106980-12']);  _gaq.push(['_trackPageview']);
  (function() {    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);  })();
</script></head>
<body <?php body_class(); ?>><div id="wrapper" class="hfeed"> <div id="header"> <div id="masthead"> <div id="branding" role="banner"> <?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?> <<?php echo $heading_tag; ?> id="site-title"> <span> <a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a> </span> </<?php echo $heading_tag; ?>> <div id="site-description"><?php bloginfo( 'description' ); ?></div>
<?php // Check if this is a post or page, if it has a thumbnail, and if it's a big one if ( is_singular() && has_post_thumbnail( $post->ID ) && ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) && $image[1] >= HEADER_IMAGE_WIDTH ) : // Houston, we have a new header image! echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' ); else : ?> <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" /> <?php endif; ?> </div><!– #branding –>
<div id="access" role="navigation">  <?php /*  Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?> <div class="screen-reader-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyten' ); ?>"><?php _e( 'Skip to content', 'twentyten' ); ?></a></div> <?php /* Our navigation menu.  If one isn't filled out, wp_nav_menu falls back to wp_page_menu.  The menu assiged to the primary position is the one used.  If none is assigned, the menu with the lowest ID is used.  */ ?> <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?> </div><!– #access –> </div><!– #masthead –> </div><!– #header –>
<div id="main">

 

 

8:44 am
July 24, 2010


Philip Light

Admin

posts 57

Post edited 1:53 pm – July 24, 2010 by Philip Light


Alrighty, I think I figured out how you can do this.  You mentioned in another post you are using the Twenty Tne (the new default WP Theme).  I did my first WP 3.0 install yesterday so went to that site and dug into the code a little bit for you.

The right place to edit is the functions.php file that you edit the same was as the header.php as discussed above.  Once you get there, search for this code…

 // Add default posts and comments RSS feed links to head
add_theme_support( 'automatic-feed-links' );

To disable, simply add two /'s to the front of the second line so it becomes like…

// Add default posts and comments RSS feed links to head
//  add_theme_support( 'automatic-feed-links' );

That should get it.  If you starting using the site as a blog then you can just reverse this and the RSS feed links will be back.
Let me know if it doesn't work for some reason.

Philip

5:39 pm
July 24, 2010


Julia Walkden

Member

posts 11

Great to have you on tap – I would never have figured that out in a million years! Thanks for explaining the solution so clearly . . .

Julia

 

9:55 am
August 2, 2010


Philip Light

Admin

posts 57

You are very welcome :)

7:02 pm
January 22, 2011


Robert Stowe

Member

posts 1

Philip Light said:

Heya,

Those links are for your RSS feeds, which are pulled from Posts and the Comments users might leave on your Posts.  In your case, it seems you are only using Pages, so it's not a bad idea to remove those links, unless you plan on using Posts at some point as well.

To remove them, you will need to dig into your Theme files a little bit and look for the header.php file, where these links are usually coded in.  To do so, you can use FTP or via your Admin Center under Appearence > Editor, then click on the header.php file, then erase the lines that you are seeing. It's likely to look a bit different (based on the theme), there but you should be able to find it.

Make sure you get rid of the whole line, but nothing else, as otherwise you might have a random character on your page or worse.

Also, noticed that your onsite Site Map is a bit messed up.  You've made an XML Site Map, which is for things like Google's Webmaster Tools, but then pasted the XML on your site.  You want instead to use a Site Map plugin that creates straight HTML on your sitemap page and actual links to every page.  I personally use this plugin, http://wordpress.org/extend/pl…..generator/ for that.

Best of luck!

Philip Light


 Hello Phillip,

 

Thank you for your post from last July. Please see your part of the post which I italicized.  I have the same problem, but I am interested in preserving the blogging capability. How can I get rid of these /comments/feed/ type broken links?

 

Thank you for your help.

 

Bob Stowe

No Tags