Feature #5314
closed
Added by David dos Santos almost 9 years ago.
Updated almost 9 years ago.
Category name:
WordPress Plugins
Description
Hi Boone,
We would like to update our ACERT plugin (attached).
I added lines 389-403 to include events and projects on category pages.
Thank you,
David
Files
- Category name set to WordPress Plugins
- Status changed from New to Resolved
- Target version set to 1.9.10
Hi Boone,
We were wondering if anything in particular stood out to you during this update. I was able to include events and projects and category pages on our test site with this version of this plugin but it is not working on our live site.
Thank you,
David
http://wat1.hunter.cuny.edu/?cat=120
Hi David - I looked over the code before merging it to the Commons and it looked OK to me. Can you give me more specific instructions on how to reproduce the problem you're experiencing on the production site (including URLs)? I may be able to do some targeted debugging.
Hi Boone-on our test site here: http://wat1.hunter.cuny.edu/?cat=120
we have a post, and an event and project where I have extended the category to the taxonomies.
This update displays them to the category pages.
On our live site if I go to an event such as:http://acert.hunter.cuny.edu/events/calendar/wikipedia-sp16/
and click on a category(which we list under Topics) on the page such as "Assignments & exams" http://acert.hunter.cuny.edu/pedagogy/assignments/
I can see all the posts in this category but not any of the events.
Thank you so much for looking into this.
Hi David -
Thanks for the additional details. I'm not able to access your test site - maybe it's behind a firewall or something.
After some debugging, it looks like there is a conflict between your most recently added custom code (query_post_type()) and the Add Categories to Pages plugin. The latter plugin is forcing the 'post_type' query var on all category pages to 'post,page'. So when your query_post_type() checks to see whether $query->get( 'post_type' ) is empty, it never is - Add Categories to Pages has already set it. In cac-acert-custom.php, you're already adding the 'category' and 'post_tag' taxonomies to your post types, which means that Add Categories to Pages is superfluous. I'd suggest deactivating it, and looking to see whether the problem is solved.
Thank you Boone, I will look into this. Sorry I forgot that our test site is only accessible from the 68th street campus. I may have that plugin disabled on my test site.
Thank you so much Boone, it seems to be working now.
Great. Thanks for following up, David.
Also available in: Atom
PDF