Categories and subcategories
This topic contains 6 replies, has 3 voices, and was last updated by Karin Zickler 5 years, 8 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: category, count, subcategory
-
AuthorPosts
-
February 18, 2020 at 1:32 pm #530991
I created several categories and some have multiple subcategories. The following questions have arisen:
1. On the GD Location page there is the possibility to show the category count. But the count does not include subcategories; e.g. my category “eat & drink” has the subcategories “restaurant”, “fast food” etc. The parent category shows a “0” although the subcategory “restaurant” has 10 entries and the “fast food” 5 entries. This creates a wrong impression. Besides, when I choose the option that categories with no listing should not be displayed, my category “eat & drink” does not show any more. The same problem exists for the categories being displayed on the map.
2. Is it possible to insert an additional field for subcategories in the “add listing” form? There is the field “Categories” and I can choose all categories whether parent or subcategory. I want to select a parent category first and then the subcategory, whereby the parent category should be a required field.
I hope you can help me with this problem.
February 19, 2020 at 2:11 am #5310961
Listings in a child category are not included in the parent category, this is by design. There is an option to include listings in a child category on the archive page of the parent category, but this doesn’t extend to GD Elements.
I will ask the developers to take a look at your idea and whether they can consider enabling this through a snippet or option in the near future.
2
Making a parent required is a good idea, also, and sounds like it would be a solution. This is the way that it worked in V1. I will ask the developers to consider that, too.
For now, this isn’t how GeoDirectory works, though, and we do not provide customizations here in the forum. Both of these would require your own customization outside of what we can help with directly here in support.
Both of these could be accomplished by a GD Expert here:
February 24, 2020 at 1:32 pm #531942Hi Karin,
the point has been fixed and cat post count showing appropriately.
You can try this patch or wait for next release.
https://github.com/AyeCode/geodirectory/commit/50f4b67c5df2fbb5e96d22529b9580a5e2b7b79c2nd point has been removed for a reason. It could be done with the help of a small Js fix. You can take help of a GD Expert here as Alex said:
http://geodirectoryexperts.com/Thanks
February 24, 2020 at 4:59 pm #531973Thank you very much.
Now cat post count includes also the subcategories. But it does not work with “hide empty”, or “sort by number”.
My parent category is empty, but my subcategory has 10 entries. If I tick “hide empty” this parent category does not show at all. Can this be fixed as well?February 24, 2020 at 10:42 pm #532032If I understand it correctly, including the child/subcategory listings in the parent category isn’t possible without actually assigning the parent category to the listings. This can be ‘forced’ when the listing is add/edited with a customization.
February 27, 2020 at 5:29 am #532499Hi Karin,
Thats how WordPress queries works for hide empty and sory by.
You can solve it by forceing parent cat selection.Thanks
February 27, 2020 at 4:39 pm #532608Ok, thank you all for your help.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket