GeoDirectory SupportHow do I change/edit the categories displayed in detail sidebar? – GeoDirectory Support https://wpgeodirectory.com/support/topic/how-do-i-changeedit-the-categories-displayed-in-detail-sidebar/feed Tue, 03 Feb 2026 20:01:21 +0000 http://bbpress.org/?v=2.5.14-6684 en-US https://wpgeodirectory.com/support/topic/how-do-i-changeedit-the-categories-displayed-in-detail-sidebar/#post-31842 <![CDATA[How do I change/edit the categories displayed in detail sidebar?]]> https://wpgeodirectory.com/support/topic/how-do-i-changeedit-the-categories-displayed-in-detail-sidebar/#post-31842 Tue, 24 Feb 2015 10:28:30 +0000 Greg McEwan Marriott Hi

I managed to find by searching through the core plugin for days (lol) where to replace the category list in main section with category icons as seen below

Where do I find the code that builds the category list in the detail side bar?

I would prefer to JUST show the categories in the sidebar and not on the main section?

I had to edit line 620 onwards in geodirectory_template_actions.php as per code below which is not the way to do it, how can i add this rather in my functions.php?


									$links[] = "<a href='".esc_attr( get_term_link($term,$post_taxonomy) ) . "'>$term->name";
									
									// **************************************greg************************************** //
									
									$linky[] = '<a href='.esc_attr( get_term_link($term,$post_taxonomy) ) . '><img src="http://mysocial.buzz/wp-content/uploads/2014/10/catx_'.$term->name.'.png" alt="'.$term->name.'"/></a>';
									
									$terms[] = $term;
									}
								endif;
							}
							// order alphabetically
							asort($links);
							foreach (array_keys($links) as $key) {
								$termsOrdered[$key] = $terms[$key] ;
							}
							$terms = $termsOrdered;
							
						}
					
						if(!isset($listing_label)){$listing_label='';}

						// **************************************greg************************************** //

                        //$taxonomies[$post_taxonomy] = wp_sprintf('%s: %l', ucwords($listing_label.' '. __('Category' , GEODIRECTORY_TEXTDOMAIN)), $links, (object)$terms);
						$taxonomies[$post_taxonomy] = wp_sprintf('%s %l', ucwords(__('' , GEODIRECTORY_TEXTDOMAIN)), $linky, (object)$terms);
						
                    }
]]>
https://wpgeodirectory.com/support/topic/how-do-i-changeedit-the-categories-displayed-in-detail-sidebar/#post-31844 <![CDATA[Reply To: How do I change/edit the categories displayed in detail sidebar?]]> https://wpgeodirectory.com/support/topic/how-do-i-changeedit-the-categories-displayed-in-detail-sidebar/#post-31844 Tue, 24 Feb 2015 10:31:40 +0000 Greg McEwan Marriott to get rid of the ‘and’ in the output cat1, cat2, cat3 and cat4 i had to add this to theme functions.php


function wpb_adding_scripts() {
	wp_register_script('place_tag_fix', '/wp-content/themes/buzzbook/js/place_tag_fix.js','','1.1', true);
	wp_enqueue_script('place_tag_fix');
}
add_action( 'wp_enqueue_scripts', 'wpb_adding_scripts' );

place_tag_fix.js



window.onload = function() {
  changeText();
};

function changeText(){
	var tags = document.getElementById('geodirtags').innerHTML;
	var res = tags.replace("and", ""); 
	document.getElementById('geodirtags').innerHTML = res;
}
]]>
https://wpgeodirectory.com/support/topic/how-do-i-changeedit-the-categories-displayed-in-detail-sidebar/#post-31854 <![CDATA[Reply To: How do I change/edit the categories displayed in detail sidebar?]]> https://wpgeodirectory.com/support/topic/how-do-i-changeedit-the-categories-displayed-in-detail-sidebar/#post-31854 Tue, 24 Feb 2015 11:42:52 +0000 Guust To show the categories in the sidebar of the detail page:
GD > Place (CPT) Settings > custom fields > Field:category (taxonomy) > Show in sidebar > YES.
When it comes to coding, you are obviously smarter than me 🙂

]]>
https://wpgeodirectory.com/support/topic/how-do-i-changeedit-the-categories-displayed-in-detail-sidebar/#post-31927 <![CDATA[Reply To: How do I change/edit the categories displayed in detail sidebar?]]> https://wpgeodirectory.com/support/topic/how-do-i-changeedit-the-categories-displayed-in-detail-sidebar/#post-31927 Tue, 24 Feb 2015 21:20:47 +0000 Paolo please let us know if we can set this as resolved.

Thx

]]>
https://wpgeodirectory.com/support/topic/how-do-i-changeedit-the-categories-displayed-in-detail-sidebar/#post-31936 <![CDATA[Reply To: How do I change/edit the categories displayed in detail sidebar?]]> https://wpgeodirectory.com/support/topic/how-do-i-changeedit-the-categories-displayed-in-detail-sidebar/#post-31936 Tue, 24 Feb 2015 21:49:49 +0000 Greg McEwan Marriott Hi all, i know about switching off the categories either in the sidebar or details page, but what i am looking for is the page that generates the categories on the sidebar

]]>
https://wpgeodirectory.com/support/topic/how-do-i-changeedit-the-categories-displayed-in-detail-sidebar/#post-31969 <![CDATA[Reply To: How do I change/edit the categories displayed in detail sidebar?]]> https://wpgeodirectory.com/support/topic/how-do-i-changeedit-the-categories-displayed-in-detail-sidebar/#post-31969 Wed, 25 Feb 2015 00:21:17 +0000 Paolo Hi,

as I’m sure you know, we don’t exactly remeber where every line of code is in the plugin especially because there is more that one developer working on it.

Searching as you noted at the beginning of the thread can take a lot of time, reason why this shouldn’t be expected as part of support.

I’ve quickly looked and I think it might be in custom_fields_functions.php around line 2451. But I haven’t tested anything myself, so I can’t be 100% sure.

Let us know how you went.

Thx

]]>