Popular Post Category Widget Sort Order
This topic contains 5 replies, has 2 voices, and was last updated by Paolo 7 years, 9 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: CPT Categories Widget
-
AuthorPosts
-
February 6, 2017 at 11:02 am #355784
With GD Popular Post Category, is there some way to define the order in which they are displayed?
I’ve set up a custom post type for Hotels. I created 5 categories: 1 star, 2 star, 3 star, 4 star, 5 star. Each hotel will be categorized with one of these categories. I’m then using the Popular Post Category widget above he map on the home page. Here’s how it looks:
I figure I can tighten up the layout through CSS. But what about the order? Seems like it’s ordering on most posts first, then a reverse sort (5, 4, 3, 1). This is how I would like it to look:
A second question…. Is there some way to have the widget display only the specific post type Hotel? I don’t want or need the Places category showing in the category dropdown. I know I could hide it with CSS, just wondering if there’s an option somewhere to select which categories to include. (I’m perfectly fine with hiding it though!)
Thanks!
February 6, 2017 at 7:52 pm #356050Hi,
they are sorted by popular (The category with highest number of listings), hence the widget name.
You can only that option with CSS.
Thanks
February 8, 2017 at 5:57 pm #357171Ah, yes. The widget name. So I see there is a CPT categories widget. Not sure how I missed that. It looks like this one will work for me, except it only seems to be working in the GD Home Right Section and GD Search Right Sidebar. It does not work when placed in the GD Listing Right Sidebar. Any ideas how to fix this?
These are the settings:
Here is the result when it works (GD Home & GD Search sidebars):
Here is the result in GD Listing Right Sidebar:
February 8, 2017 at 10:39 pm #357568Hi,
in GD Listing Right Sidebar it will work only when visiting he Hotels archive, because you selected only the Hotels CPT.
In places, it would show the Place categories if the Places CPT would be selected.
Thanks
February 9, 2017 at 9:44 am #357804This makes no sense. You’ve made programming choices that limit functionality for no apparent reason. You’ve got the GD Popular Post Category widget that shows categories everywhere, but is NOT sortable. Then you’ve got the CPT Categories widget (which is sortable by A-Z) but only shows on pages that relate to the Hotels CPT. Oh, and apparently on the hoe page which isn’t really a Hotels CPT related page.
But you don’t have a universal widget that will let you show specific categories that are sortable. I can’t understand why, but I’m definitely noticing a real pattern here with lack of sorting!
I get why Hotels CPT Categories works on the Search results page when searching for Hotels CPT, but not Places CPT. I totally understand that.
But when I click on the “2-star” category (which is a category specific to the Hotels CPT), the resulting category listing page will only show Hotels CPT results. So shouldn’t the Hotels CPT Categories widget show the x-star categories?
In summary….
http://localhost/dev/hotels/ shows Hotels CPT Categories widget content
http://localhost/dev/hotels/2-star/ does NOT show Hotels CPT Categories, even though it’s still a page tied to the Hotels CPT.The sorting thing is becoming a real problem. Maybe not for you, but for me it certainly is. I keep having to work around the inability to sort, trying to find ways to get things working.
February 9, 2017 at 4:30 pm #358314Hi,
http://localhost/dev/hotels/ shows Hotels CPT Categories widget content
http://localhost/dev/hotels/2-star/ would show subcategories of the 2 Stars category only.Maybe you can use a custom taxonomy widget : https://wordpress.org/plugins/list-custom-taxonomy-widget/
There are plenty in the WordPress.org plugin repository.
Thanks
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket