Categories and Subcategories
This topic contains 9 replies, has 2 voices, and was last updated by Paolo 9 years, 5 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
September 29, 2015 at 5:44 pm #55041
Hello.
I’m using the last version of WP and the last version og GeoDirectory v1.5.3…I’m having trouble to understand how the categories and subcategories works…
I created a principal category and added a child category, so when I add a new place I want it to be listed in a way that is shows that structure in the breadcrumb:
PLACE > CATEGORY A > SUBCATEGORY1
and not
PLACE > SUBCATEGORY1I want that the NEW PLACE that I created mantains that relationship like FATHER > SON or CATEGORY > SUBCATEGORY.
What I can do?
I already tried the different methods in the Field: Categories (taxonomy) – CATEGORY DISPLAY TYPE located in the GEODIRECTORY > LOCAL SETTING in the tab MANAGE LOCAL CUSTOM FIELDS.
Also to advise that when we choose some of the options for the CATEGORY DISPLAY TYPE in EDITA LOCAL PAGE doesn’t show the structure of CATEGORY > SUBCATEGORY.I also tried to set each CATEGORY or SUBCATEGORY as default category, but the problem is that with this option it only shows the CATEGORY selected in the breadcrumbs and not the relationship between category and subcategory that I want…
Thanks again.
Cláudia SaraivaSeptember 29, 2015 at 8:32 pm #55070Hi,
that is how it works.
In this demo I have Hotel as Custom post type, 1 star as parent catgeory and hostel as sub category.
Both the URL and the breadcrumb are showing correctly:
http://wpgeo.directory/hotels/1-star/hostel/
Home > Hotels > 1 star > Hostel
If you provide a link to your webiste with admin credentials we can have a look at your settings.
Thanks
September 30, 2015 at 8:55 am #55114Hello.
I’m using the default PLACE Post Type…
My demo site is: http://cloudsidea-design.com/DEMOS-SITES/mvm02/
The example:
http://cloudsidea-design.com/DEMOS-SITES/mvm02/museu/agricultura-pastoricia-e-aquacultura/viveiro-da-fonte-santa/
This link is of a place that suposed is linked to the subcategory Agricultura, Pastorícia e Aquacultura that is part of the main category “ECONOMIA LOCAL“:The beadcrumbs looks like this:
Home > Museu > Agricultura, Pastorícia e Aquacultura > Viveiro da Fonte SantaAnd It should be like this:
Home > Museu > Economia Local > Agricultura, Pastorícia e Aquacultura > Viveiro da Fonte SantaIt’s necessary to create one Custom Post Type for all the main categories that I need? Doesn’t make sense… for me I guess…
Thanks for your reply
Cláudia Saraiva.September 30, 2015 at 9:51 am #55131This reply has been marked as private.September 30, 2015 at 4:36 pm #55220Hi,
all fixed. Permalinks where correct.
That listing was only assigned to the sub-category, when both parent category and sub-category must be assigned to the listing for the system to work correctly.
Thanks
September 30, 2015 at 5:01 pm #55223Actually not, I gave you wrong information, the detail page can only show the default category in the URL, not parent and subcategory.
There is no way to do that.
Thanks
October 1, 2015 at 2:22 pm #55364Hi thank you for your reply….
I insist… ins’t there a way to change the way the geodirectory works with categories and subcategories?
I need that the structure works with at least 3 levels CATEGORY > SUBCATEGORY > SUB SUB CATEGORY…
I already tried to create for each MAIN CATEGORY a Custom Post Type… but the problem is the same…
Thanks again.
Cláudia Saraiva
October 1, 2015 at 7:00 pm #55408Hi Claudia,
it is really not possible to have both the location, category and sub-category in the URL.
It would require a major customization of the plugin.
Thank you
October 3, 2015 at 10:05 pm #55645Hello…
Idon’t know you can please se this code…
I’m still tryng to mage a way to show the category > subcategory structure in the breadcrumbs….
I know that is not a good pratice to change the code because of future problems with updades.. but well i am trying to get a solution for a problem that i seems is a general request at your forum…
So please review and gave me your opinion… I’m not a great programmer…
SO I tried this adjustment in the page at:
pluginsgeodirectorygeodirectory-functionsgeneral_functions.phpat line:
your code: if (geodir_is_page(‘detail’))
I enter this new one:if (geodir_is_page('detail')) //the new code { $category = get_the_terms( $post_type->ID, $gd_taxonomy ); foreach ( $category as $cat){ $cat->name.' '; $cat->slug. ''; } $breadcrumb .= $separator . '<a>slug.'">'.$cat->name.'</a>'; //end new code //code origianl $breadcrumb .= $separator . get_the_title(); $breadcrumb .= '</li>'; //end code original // new code }
I know that this option gives me an error…
The outocome is right and i can view the right levels of the breadcrumbs until the second level, like this:
CPT CATEGORY > MAIN CATEGORY> SUBCATEGORY > NAME OF POST
But if i need a new subcategory, gives me a litle error… it jumps a category..
It’s suposed to write:
CPT CATEGORY > MAIN CATEGORY> SUBCATEGORY > SUB-SUBCATEGORY > NAME OF POST
but it jumps a subcategory..
CPT CATEGORY > MAIN CATEGORY> SUB-SUBCATEGORY > NAME OF POSTI think it’s possible to wrote a code, not changing a thing in the database, in the general_fucntions.php based on the the WIDGET GD POPULAR POST CATEGORY… because it display all the categories and subcategories…
I just don’t know how to improve the code at general_functions.php…
Please advice…
Thanks
Cláudia Saraiva
October 5, 2015 at 3:00 pm #55784Hi Claudia,
This is considered a customization request. Only 2 members out of hudreds requested it and we can’t consider it a general need.
Currently we are undergoing servers maintenance because yesterday we had a hardware failure and we really don’t have spare time to help with customizations.
Thanks for your understanding,
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket