Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
  • Register
Welcome to the Q&A for Question2Answer.

If you have questions about the platform, click here to ask and please use English.

If you just want to try Q2A, please use the demo, which also grants admin access.

Apr 29: Q2A 1.5.2

Ability to add content/description for each tag page?

+1 vote
In the interest of good SEO, it would be nice to be able to add content or a description for each tag that users create when they ask questions. Since each tag becomes it's own page, being able to add even just 100 words of content for each one that would then show up on the top of the tag page can significantly improve the appearance of the page to Google and can help drive additional traffic without much extra work.

The simplest way I see this working is having a "tags" page in the admin section that has a table with the tag name, content/description, and an edit link.

If this can be done entirely through a plugin, I'd be willing to look into building this myself and contributing it here. I would just need a few pushes in the right direction to get me started.
asked Mar 2, 2011 in Q2A Core by anonymous

1 Answer

0 votes

Good question! For now the best way to do this is via an advanced theme. You could override the head_custom() and main_parts() functions to output the META description and extra content respectively. In your functions, check ($this->template=='tag') to see if you're on a tag page and then the part of $this->request after the slash to find the tag.

Of course, this still leaves the issue of how to store the extra information for tags. You should probably create a new table in the database to do this, then use a plugin with a page module to provide the editing interface.

BTW, in Q2A 1.4 I plan to introduce a new type of plugin module which allows you to modify the page content without using a custom theme. This would allow you to do the whole thing via a single plugin with multiple modules.

answered Mar 3, 2011 by gidgreen