0

I am developing a theme for myself and I was wondering why wordpress tags are allways displayed bellow the_content.

I know that this can be done via shortcode, but I would like to know if this is for seo purposes, or there is any technical reason?

I´am asking because I didn´t find any information on the web...

My code:

in functions.php (found in here)

function tags_in_post($atts) {    // [tags] outputs post's tags in a span
global $post;
$tags = '<span class="post-tags">';
ob_start();
the_tags( '<span class="post-tags">', ', ', '</span>' );
$tags = ob_get_contents();
ob_end_clean();
return $tags;
}
add_shortcode ('tags', 'tags_in_post');

Than this shorttag [tags] must be used inside the wordpress editor.

Thanks

2

So if I look closely, seems our actual question is "Why does WordPress put Post Tags at the bottom of a Post?"

The answer depends on the theme, of course. But, most themes put them after a post's body so that you can use it as part of browsing away from that post, to get involved with further reading. Basically like saying, "You've been reading about: Toys, Babies, Books" where each of those items is a link to, presumably, articles on those topics.

The idea of having them at the end of the article is so you don't get bored too quickly and jump off to read something else.

Unless you mean something else by tags as that can be a pretty vague thing around these parts.

  • First of all, thanks! The title of my question should be the one you mentioned. So, it doesn't hurt my seo if I put them inside the content, right? – Alex Jun 18 '13 at 17:52
  • Great. If this answer satisfies your curiosity, please select it as "correct". If not, please explain. – GhostToast Jun 18 '13 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.