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 Ticket
  • Author
    Posts
  • #355784

    key
    Free User
    Post count: 24

    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!

    #356050

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    they are sorted by popular (The category with highest number of listings), hence the widget name.

    You can only that option with CSS.

    Thanks

    #357171

    key
    Free User
    Post count: 24

    Ah, 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:

    #357568

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    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

    #357804

    key
    Free User
    Post count: 24

    This 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.

    #358314

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    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

Viewing 6 posts - 1 through 6 (of 6 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount