[Plugin: Question and Answer Forum] Category drop down menu
-
Hi,
I run a Taekwondo site and the instructors wanted to be able to have a question and answer area, so I stumbled across your plugin. I’ve been trialling it (currently hidden from users without direct url) but have been facing a few issues with it, the main thing being the drop down category box.
As a stock 2.1.2 version, it lists all the categories with a count after it, regardless of whether there’s any questions in that category. The post count is that of page_type post rather than question, when a user clicks on one of the categories without posts, the entire theme css goes to pot with a 404, but if the category contains questions, it goes there ok (but the count’s still wrong).
It seems to be based around the get_categories (); query in querys.php, in that by get_categories() it’s only returning all the categories (hiding the empty ones of course), surely there needs to be a custom_page_type=question query in there somewhere (and a count for those). I’ve been running through the code for a while, that and looking up the codex at wordpress and various other places, but I’m not that great at coding lol. The only real way I’d see it work is with something along the lines of foreach get_posts where post_type = question then loop through each for the categories and then implement the count.
The only work around at the moment would be to have seperate categories for questions and posts or set a private question, though in theory we should be able to get it to work as above.
Gav
http://ww.wp.xz.cn/extend/plugins/question-and-answer-forum/
The topic ‘[Plugin: Question and Answer Forum] Category drop down menu’ is closed to new replies.