Thread Starter
gpsy1
(@gpsy1)
Its marked red symbol (>) after:
rel=”category tag” >(this one)
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Don’t focus on the red symbol, it always says that.
It looks like the ‘rel’ attribute is there for a reason. Is it necessary to fix this error?
Thread Starter
gpsy1
(@gpsy1)
Hello Andrew, thanx for the quick replay.
Im not bothered by those errors as the blog works fine and i have no issues.
But someone advise me that it would be good if my blog have validated html and since i don’t understand what the problems are i would like to at least understand what’s going on. I have been checking few different themes and more or less many of them don’t validate 100%. I manage to find only one that does.
My question is:
1. Does this error affect my blog,ratings or search rankings of my blog in any way?
2. Do i need to fix it?
3. If YES what can i do to fix it?
Thanx
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Does this error affect my blog,ratings or search rankings of my blog in any way?
We can’t speak for search engines, it would be best to ask this to their forums. Try http://groups.google.com .
Do i need to fix it?
I don’t know, do you need to? I don’t know your needs, but it isn’t a serious error and it won’t affect the format of your page, unlike other errors.
Thread Starter
gpsy1
(@gpsy1)
It make sense what you say, i shouldn’t be asking here about search and ranking problems.
The thing is, i have total 46 categories and subcategories on my blog and i’m getting 51 error with w3. Which means if i can fix this category rel errors i will be having only 5 errors total, which sound really good to me.
So please, if im not asking too much, can you try to explain this rel issue to me and how to fix it.
Thank you
Thread Starter
gpsy1
(@gpsy1)
This is what i did so far:
I try this post using code to functions.php
add_filter( 'the_category', 'replace_cat_tag' );
function replace_cat_tag ( $text ) {
$text = str_replace('rel="category tag"', "", $text); return $text;
}
– DIDNT WORK
Also this post using code to wp-includes/category-template.php
$rel = ( is_object( $wp_rewrite ) && $wp_rewrite->using_permalinks() ) ? 'rel="tag"' : 'rel="category"';
– DIDNT WORK
And this post using code to functions.php
function remove_category_list_rel( $output ) {
// Remove rel attribute from the category list
return str_replace( ' rel="category tag"', '', $output );
}
add_filter( 'wp_list_categories', 'remove_category_list_rel' );
add_filter( 'the_category', 'remove_category_list_rel' );
– DIDNT WORK
Also this post using code to functions.php
function remove_category_list_rel($output)
{
$output = str_replace(‘rel="category tag"’, "", $output);
return $output;
}
– DIDN’T WORK
and last this post using code in functions.php
add_filter( 'the_category', 'add_nofollow_cat' ); function add_nofollow_cat( $text ) { $text = str_replace('rel="category tag"', "", $text); return $text; }
– DIDN’T WORK
No more ideas, please help!!!