The filter you hooked passes an html list of tags. There is the html close anchor tag ” between ‘featured’ and the comma, that is why ‘featured,’ doesn’t work. If you searched for ‘featured,’ and replaced back in ” it would probably work.
If you look at your served page source, you will see anchor tags with broken hrefs and no link text. While this works OK, it is a bit sloppy. Just sayin’ 😉
I really doubt it, the code just grabs tags, it doesn’t examine what they are.
I neglected to wrap my html examples in backticks in my previous reply, so they got stripped out, my intent was the text you are trying to extract the ‘featured,’ from actually looks like this: featured</a>,
You need to search for the whole thing and replace back the closing tag.
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘add_filter('the_tags', 'myTags');’ is closed to new replies.