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 7 years ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
March 15, 2018 at 10:20 am #421557
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
March 15, 2018 at 11:28 am #4215691. 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
March 15, 2018 at 6:16 pm #421626This reply has been marked as private.March 15, 2018 at 9:56 pm #421637You can only hide all categories or none, there is no option to only hide some.
ThanksMarch 16, 2018 at 9:07 am #421676This reply has been marked as private.March 16, 2018 at 1:10 pm #4217331. 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.March 16, 2018 at 5:58 pm #421786Thank 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!
March 16, 2018 at 10:57 pm #421806#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
March 17, 2018 at 9:38 am #421873It 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”)
March 20, 2018 at 8:23 pm #422399Thanks 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!
March 20, 2018 at 9:03 pm #422419Setting 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.
March 22, 2018 at 5:14 pm #422775Hello,
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
March 23, 2018 at 2:50 pm #422976Hello,
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.
March 23, 2018 at 3:46 pm #422989Hi 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!
March 24, 2018 at 11:56 am #423112As I understand it that drop down for categories is ordered by category ID, which is sequential.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket