Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+17 votes
1.7k views
in Plugins by
edited by

I am looking for a method to enhance user experience and seo by adding category information to the categories. But I cant find a way how to use the existing category description.

Is there a way to use the category description as introduction on the category page ?

Is it possible to make the category description accept html code including script to load maps or similar ? By using the wysiwig editor for example ?

Could at least images be supported ?

Could somebody write a plugin IF POSSIBLE ?

 

Please see the following example:

 

Q2A version: 1.5.1
by
a very good idea...and the same feature for tags will also be good.To show a small description of category or tag page.
by
Perhaps closely related to this would be a way to manage tag synonyms. :)

5 Answers

+1 vote
by
This is good idea. I will work on it. Now, if you can add common description for all categories, over categories list (yourqa.com/categories) add:

in file qa-page-categories.php after line 85 where is $qa_content['title']=qa_lang_html('misc/browse_categories');

add:

$qa_content['custom'] = 'your general description';

You can use html code here, and php of course too. This is hack no plugin, so use it if you need it only. I will work on plugin, but maybe somebody working on it already.

can anbody run syntax higlander here for code? :)
by
I have suggested this before. I think that it would be nice to have the same thing for tag pages.  Google and other search engines often use the first or most descriptive <P> tag as a snippet instead of the meta description tag for the page. Adding custom description paragraphs would make a lot of sense from a SEO perspective.
by
Yes, I am looking forward to have that, for categories and tag pages as well. Having that would allow to set up a niche site, lets say "New York restaurants" with a description of the place and realted questions under that. @Dude, it would be excellent to have the wysiwig editor to write these intros. Please note that category discriptions actually allow only about ?1000 characters.
by
there should be an option to add description for a category while creating the category itself.
by
I think the description editor should be added to the admin page. A good place to start might be to modify the tag synonym pluglin

http://www.question2answer.org/qa/8339/new-plugin-tag-synonyms-auto-editor

I modified this at one point add all questions of a given tag to a given category.  I used the category numbers in the database.  Instead of inputting (tag,newtag) in the admin panel I was able to rework it so that entering (tag,category#) would change add all questions associated with that tag to the entered category number.  I am sure there is a better way to do it but it could be a good starting point.  For example (tag,tag description) might work the same way.
by
Both tag and category pages have custom <h1> titles.  Is there any reason why

function page_title()
        {
            $title=@$this->content['title'];
           
            if (strlen($title))
                $this->output('<H1>'.$title.'</H1>');
        }

Couldn't be modified to include a description as well as a title?
by
The category descriptions are already being stored in

qa-page-admin-categories.php

'content' => array(
                    'id' => 'content_display',
                    'tags' => 'NAME="content"',
                    'label' => qa_lang_html('admin/category_description'

If that could be posted just below

function page_title()
        {
            $title=@$this->content['title'];
           
            if (strlen($title))
                $this->output('<H1>'.$title.'</H1>');
        }

I think that would accomplish the goal for categories. Another admin dialog would have to be created to do the same with tags as there is currently no tag description field in the admin form.  It also might require database changes. Not sure if there is another way around it.  Any thoughts?
by
edited by
Ok, I could get the category content the following way:


if ( (isset($this->content['categoryids'])) && (!empty($this->content['categoryids']))  && ($this->template=='qa')){
$mycategoryid = end($this->content['categoryids']);
$mycatgeorycontentholen = qa_db_query_sub("SELECT content FROM ^categories WHERE categoryid =  '$mycategoryid' ");
$mycatgeorycontent = qa_db_read_one_value($mycatgeorycontentholen,true);
$this->output($mycatgeorycontent);}

This works so far.

To avoid showing the content on other pages than on the mainpage qa in my case I added ...($this->template=='qa')... in the first line.

I have added this to the main function in my advanced theme.
+1 vote
by

Also interested in this plugin. No one has yet implemented?

+1 vote
by
We want to see it as a plugin. Noah, Gidgreen, Scott
+2 votes
by

Yes, a plugin is needed urgently, and of course this fileds should be filled for the Category-pages:

<META NAME="description" CONTENT="140 letters of Category desciption...?">

<META NAME="keywords" CONTENT="Keywords....">
0 votes
by

I also need a plugin for customizing categories TITLE, H1 and adding few lines of text above H1 when I create a category. This would be great feature for specific (niche) Q2A sites, like Q2A about animals, jobs, countries and etc. :)

Does anybody developing plugin with this features, or maybe it's already developed?

...