GeoDirectory SupportRemoving the share buttons from listing sidebar – GeoDirectory Support https://wpgeodirectory.com/support/topic/removing-the-share-buttons-from-listing-sidebar/feed Tue, 03 Feb 2026 13:19:54 +0000 http://bbpress.org/?v=2.5.14-6684 en-US https://wpgeodirectory.com/support/topic/removing-the-share-buttons-from-listing-sidebar/#post-6644 <![CDATA[Removing the share buttons from listing sidebar]]> https://wpgeodirectory.com/support/topic/removing-the-share-buttons-from-listing-sidebar/#post-6644 Sat, 28 Jun 2014 20:02:40 +0000 Jason Kadlec first req – a bit outside the scope of support, but I hope you can help me learn a bit more about how to use filters —

I want to modify this function I found in geodirectory_hooks_actions.php


function geodir_detail_page_sidebar_content_sorting()
{
	$arr_detail_page_sidebar_content =
	apply_filters('geodir_detail_page_sidebar_content' , 
					array( 	'geodir_social_sharing_buttons',
							'geodir_share_this_button',
							'geodir_detail_page_google_analytics',
							'geodir_edit_post_link',
							'geodir_detail_page_review_rating',
							'geodir_detail_page_more_info'
						) // end of array 
				); // end of apply filter
	if(!empty($arr_detail_page_sidebar_content))
	{
		foreach($arr_detail_page_sidebar_content as $content_function)
		{
			if(function_exists($content_function))
			{
				add_action('geodir_detail_page_sidebar' , $content_function);	
			}
		}
	}
}

I can get what I’m after by commenting out



//'geodir_social_sharing_buttons',
							//'geodir_share_this_button',

But then of course I’m modifying the core plugin which I don’t want to do.

I tried a few things in the functions.php – for example adding:

remove_filter('geodir_detail_page_sidebar', 'geodir_social_sharing_buttons');

I also tried this:


function geodir_sidebar_custom() {
						array( 	//'geodir_social_sharing_buttons',
							//'geodir_share_this_button',
							'geodir_detail_page_google_analytics',
							'geodir_edit_post_link',
							'geodir_detail_page_review_rating',
							'geodir_detail_page_more_info'
							); // end of apply filter
}
add_filter('geodir_detail_page_sidebar_content', 'geodir_sidebar_custom')

Neither had the intended effect.

In the original code – it’s a variable which is then pulling a filter which is itself an array of functions… pretty nesty!

My theme has share buttons baked in already that look really nice so that’s why I’m trying to hide them.

FWIW – a feature request is to just turn those into widgets as well… it would make things more plugin-like and less theme like — I was surprised those elements where so baked in when the other elements in the listing side bar are widgeted – the my dashboard, map and popular listing stuff.

Thank you for helping me with a little copy paste code or refer me to a better tutorial – I’ve been through the codex and a few other tuts out there – but clearly not got my head around how to apply what I’ve learned to this situation.

]]>
https://wpgeodirectory.com/support/topic/removing-the-share-buttons-from-listing-sidebar/#post-6646 <![CDATA[Reply To: Removing the share buttons from listing sidebar]]> https://wpgeodirectory.com/support/topic/removing-the-share-buttons-from-listing-sidebar/#post-6646 Sat, 28 Jun 2014 20:35:37 +0000 Paolo In this post I describe a similar situation: https://wpgeodirectory.com/support/topic/disable-select-map-view/

Basically what you want to do is:



// remove the orginal action entirely

remove_action('geodir_detail_page_sidebar', 'geodir_detail_page_sidebar_content_sorting', 1);

// add a new action 

add_action('geodir_detail_page_sidebar', 'geodir_detail_page_sidebar_content_sorting_custom', 1);

// copy the orginal function, rename it and comment the code you wish to hide

function geodir_detail_page_sidebar_content_sorting_custom()

{
	$arr_detail_page_sidebar_content =

	apply_filters('geodir_detail_page_sidebar_content' , 

					array( 	'geodir_share_this_button',

							'geodir_detail_page_google_analytics',

							'geodir_edit_post_link',

							'geodir_detail_page_review_rating',

							'geodir_detail_page_more_info'

						) // end of array 

				); // end of apply filter

	if(!empty($arr_detail_page_sidebar_content))

	{

		foreach($arr_detail_page_sidebar_content as $content_function)

		{

			if(function_exists($content_function))

			{

				add_action('geodir_detail_page_sidebar' , $content_function);	

			}

		}

	}

}

I totally removed ‘geodir_social_sharing_buttons’, from the array.

Hope this helps!

Thx

]]>
https://wpgeodirectory.com/support/topic/removing-the-share-buttons-from-listing-sidebar/#post-6663 <![CDATA[Reply To: Removing the share buttons from listing sidebar]]> https://wpgeodirectory.com/support/topic/removing-the-share-buttons-from-listing-sidebar/#post-6663 Sun, 29 Jun 2014 01:12:17 +0000 Jason Kadlec Aha! Completely obvious now that I see it… I was thrown off by trying to remove the filter didn’t realize I could just remove the entire action and recreate. Nice!

Thank you @paolo!

BTW I’m integrating this with the Salient theme – it’s looking really nice.

I’m going to replicate how Salient will either put your images up top or if a video is present, then the video goes up top.

For Salient theme – it’s for their “portfolio” but I liked the look of it.

Anyhoo – one more tick box checked.. now onto the image vs video!

*topic resolved*

*impressed by fast response on Saturday!*

]]>
https://wpgeodirectory.com/support/topic/removing-the-share-buttons-from-listing-sidebar/#post-6665 <![CDATA[Reply To: Removing the share buttons from listing sidebar]]> https://wpgeodirectory.com/support/topic/removing-the-share-buttons-from-listing-sidebar/#post-6665 Sun, 29 Jun 2014 01:47:44 +0000 Paolo I was around working on my directory. It’s a pleasure to spare some time to help, especially if it allows to write replies to use for the docs as example…

Tomorrow I’ll take it off though! 🙂

]]>
https://wpgeodirectory.com/support/topic/removing-the-share-buttons-from-listing-sidebar/#post-6666 <![CDATA[Reply To: Removing the share buttons from listing sidebar]]> https://wpgeodirectory.com/support/topic/removing-the-share-buttons-from-listing-sidebar/#post-6666 Sun, 29 Jun 2014 01:52:21 +0000 Paolo https://wpgeodirectory.com/support/topic/removing-the-share-buttons-from-listing-sidebar/#post-6671 <![CDATA[Reply To: Removing the share buttons from listing sidebar]]> https://wpgeodirectory.com/support/topic/removing-the-share-buttons-from-listing-sidebar/#post-6671 Sun, 29 Jun 2014 03:08:14 +0000 Jason Kadlec I will for sure post when I get things up and running more – I want the review to say more than great help from support 🙂

]]>
https://wpgeodirectory.com/support/topic/removing-the-share-buttons-from-listing-sidebar/#post-13280 <![CDATA[Reply To: Removing the share buttons from listing sidebar]]> https://wpgeodirectory.com/support/topic/removing-the-share-buttons-from-listing-sidebar/#post-13280 Wed, 27 Aug 2014 02:28:29 +0000 jaciando hi there – can i please jump in on this – i would like to also remove the current social share buttons etc that appears in listing detail sidebar and add my own (well.. addthis) social share icons instead. so i really dont know anything about php – and dont want to modify the original file – but could you please just clarify what i would need to do to remove this entirely – in child theme? thanks so much

]]>
https://wpgeodirectory.com/support/topic/removing-the-share-buttons-from-listing-sidebar/#post-13355 <![CDATA[Reply To: Removing the share buttons from listing sidebar]]> https://wpgeodirectory.com/support/topic/removing-the-share-buttons-from-listing-sidebar/#post-13355 Wed, 27 Aug 2014 16:47:49 +0000 Paolo Hi Jaciando,

In this post (plus the one linked above) I explain exactly what you are looking for.

How to remove/edit elements in the detail page sidebar.

If by reading thiese posts you are still not confident editing the php file on your own, you should hire someone to do it for you, because it can be explained any simpler.

Thx

]]>
https://wpgeodirectory.com/support/topic/removing-the-share-buttons-from-listing-sidebar/#post-20770 <![CDATA[Reply To: Removing the share buttons from listing sidebar]]> https://wpgeodirectory.com/support/topic/removing-the-share-buttons-from-listing-sidebar/#post-20770 Wed, 05 Nov 2014 23:07:27 +0000 jeffreyr Paolo, could you kindly tell me which file I need to edit? I didn’t quite get that from the conversation. Thanks!

]]>
https://wpgeodirectory.com/support/topic/removing-the-share-buttons-from-listing-sidebar/#post-20834 <![CDATA[Reply To: Removing the share buttons from listing sidebar]]> https://wpgeodirectory.com/support/topic/removing-the-share-buttons-from-listing-sidebar/#post-20834 Thu, 06 Nov 2014 17:08:47 +0000 Paolo Hi Jeffrey,

You’d add the code above to your theme functions.php file.

The plugin is made so that its functions can be modified without modifying it’s file.

Files of the plugin should never be modified.

Let us know,

Thx

]]>