How to Hide Specific Categories from displaying on the detail listing?

This topic contains 14 replies, has 3 voices, and was last updated by  Alex Rollin 6 years ago.

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

Open Support Ticket
  • Author
    Posts
  • #421557

    Ian Mullen
    Expired Member
    Post count: 31

    Hello,

    I have set up my categories so that some of the parent categories are really more just like titles, to label and group the categories underneath it.

    What that means is I would *ideally* like to

    1. Not display these items where the category icons normally show on a Listing detail page

    and/or

    2. Not allow them to be ticked in the first place when someone is in the Add Listing part of the site. (yet still allowing people to choose its “child” categories underneath it – i.e. it being just a heading.

    (note: I know that if I seperated them out into custom fields instead of categories I would be able to add headers and labels etc, however I would be limited with what I could do with them as many features revolve around categories specifically)

    Thanks

    #421569

    Guust
    Moderator
    Post count: 29970

    1. That depends on the theme, so we would need URL and WP admin details in a private reply.

    2. A listing cannot be in a sub-category without being in the parent category.

    Thanks

    #421626

    Ian Mullen
    Expired Member
    Post count: 31
    This reply has been marked as private.
    #421637

    Guust
    Moderator
    Post count: 29970

    You can only hide all categories or none, there is no option to only hide some.
    Thanks

    #421676

    Ian Mullen
    Expired Member
    Post count: 31
    This reply has been marked as private.
    #421733

    Guust
    Moderator
    Post count: 29970

    1. Add and adjust this CSS:
    .sd-detail-cat-links img {margin: 5px 5px 5px 5px;}
    See https://wpgeodirectory.com/docs/customizing-your-style/ for more tweaks.

    2. What is it that decides the order that the categories display, and can this be changed?

    By category ID. You can try changing the IDs in the database.

    3. What is it that decides which category icon is displayed on the map?

    The category that is set as the default category.

    #421786

    Ian Mullen
    Expired Member
    Post count: 31

    Thank you Guust.

    1. Worked perfectly!

    Number 2. I am in the fortunate position to only have “dummy” content on my page at the moment while I build it, so I can without major disruption delete all my categories and re-import them in the correct order, in terms of category ID.

    My aim is to push the “title-only” categories to the end of the list, i.e. the highest number, so that I can upload a blank icon, and therefore make it effectively disappear from the list.

    To avoid any display problems in future when I go to add extra categories, I am considering adding 100 “extra” categories into my importing spreadsheet so that I can use one of them if I need to add a new category in the future, without it messing up how my categories display visually (i.e. keeping the blank icons to the end of the list) – my plan is to add 100 extra , and then disable them using the Prices & Payments plugin, until I need to free one up for a new category.

    Is this a crazy idea/ do you foresee any issues that I am not seeing with this plan?

    Number 3. I feel like I’m missing something really obvious, stupid question, but where/ how do I select the default category?

    Thanks for your help on this!

    #421806

    Guust
    Moderator
    Post count: 29970

    #2 Personally, I would go with custom fields: https://wpgeodirectory.com/docs/core-place-settings/#multiselect

    Maybe better not to delete the categories but export and rename and re-import.

    #3 You cannot do that with the current setup of your categories, you will need to choose Ajax Chained at GD > Place Settings > Custom Fields > Categories

    Thanks

    #421873

    Alex Rollin
    Moderator
    Post count: 27815

    It is much less work in the long run to use tags for the fine grain differentiation than to sweat the categories. You can use other means to add helper text or icons to help visitors find their way around.

    Use of default categories : +1 (with sensible names like “eat”)

    #422399

    Ian Mullen
    Expired Member
    Post count: 31

    Thanks Guust and Alex for your response.

    Number 2. The reason I’ve been trying to make so many different types of categories is because Categories is the only type of field (that I’m aware of) that can:

    A. Appear on the main search bar AND allow multiple selection within the “Add Listing” page (i believe you have to use a “select” custom field as opposed to a “multi-select” custom field to allow selection from the main search bar?
    B. Allow icons to display in the listings/ detail page e.g. organic icon, delivery icon etc. (I believe tags do not have icons?)

    Number 3. I have changed the Category Display Type to Ajax Chained – what would be my next step to set a default category so that THAT icon displayed on the map?

    Thanks!

    #422419

    Alex Rollin
    Moderator
    Post count: 27815

    Setting the deault is an option for the categories you select. Add one or more and you can choose the one that is default.

    Try exporting the listings where you have chose a default to see how the categories are ordered.

    #422775

    Ian Mullen
    Expired Member
    Post count: 31

    Hello,

    Thanks for your help

    2. Coming at this problem from a different angle, the reason I was using the Parent Categories as titles was partly to order categories in a certain order. Currently when someone clicks on the choose category button on the search bar, it lists them in alphabetical order. Is there a way of being able to change the order that they appear in? e.g. by ID, or some other way?

    3. I’m realising I now the place where I can choose the default category is in the Add Listing page. If I wasn’t using Ajax, what does the system usually “default” to, do you know? It’s just that check boxes are pretty important in the Add Listing page.

    Thanks

    #422976

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    2. Popular categories widget doesn’t have a sort order at this time. It is possible to code a similar list with HTML and to choose the order that way.

    3. The only way to select default category is with the “ajax chained” field UI.

    #422989

    Ian Mullen
    Expired Member
    Post count: 31

    Hi Alex,

    Thanks for your response.

    Re No. 2 – I was actually referring to the order of the categories as they appear in the Drop Down menu, not the popular categories widget. It displays alphabetically, and I was checking to see if I can change the order that that list appears in.

    Re: No. 3 – Okay, I’ll have to abandon this line of enquiry – but thanks!

    #423112

    Alex Rollin
    Moderator
    Post count: 27815

    As I understand it that drop down for categories is ordered by category ID, which is sequential.

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

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

Open Support Ticket