GeoDirectory SupportAdd widget areas to detail sidebar top and in between owner block and content – GeoDirectory Support https://wpgeodirectory.com/support/topic/add-widget-areas-to-detail-sidebar-top-and-in-between-owner-block-and-content/feed Mon, 16 Mar 2026 04:55:34 +0000 http://bbpress.org/?v=2.5.14-6684 en-US https://wpgeodirectory.com/support/topic/add-widget-areas-to-detail-sidebar-top-and-in-between-owner-block-and-content/#post-45051 <![CDATA[Add widget areas to detail sidebar top and in between owner block and content]]> https://wpgeodirectory.com/support/topic/add-widget-areas-to-detail-sidebar-top-and-in-between-owner-block-and-content/#post-45051 Wed, 08 Jul 2015 16:07:24 +0000 jkirker I have been searching the forums for a hook reference or something but have been unable to find what I’m looking for.

I want to add two widget areas on the detail page.

First, before the social block and second, after the owner/edit block as in the image below.

Any help would be appreciated.

]]>
https://wpgeodirectory.com/support/topic/add-widget-areas-to-detail-sidebar-top-and-in-between-owner-block-and-content/#post-45061 <![CDATA[Reply To: Add widget areas to detail sidebar top and in between owner block and content]]> https://wpgeodirectory.com/support/topic/add-widget-areas-to-detail-sidebar-top-and-in-between-owner-block-and-content/#post-45061 Wed, 08 Jul 2015 17:58:43 +0000 Paolo Hi,

there is hook to filter the social sharing buttons html: geodir_social_sharing_buttons_html

Here I explain how to add an image on top of them and that should help you:

https://wpgeodirectory.com/support/topic/display-featured-image-on-detail-sidebar/#post-28088

Similarly, you can use geodir_detail_page_more_info_html

Let us know how you went.

Thanks

]]>
https://wpgeodirectory.com/support/topic/add-widget-areas-to-detail-sidebar-top-and-in-between-owner-block-and-content/#post-45063 <![CDATA[Reply To: Add widget areas to detail sidebar top and in between owner block and content]]> https://wpgeodirectory.com/support/topic/add-widget-areas-to-detail-sidebar-top-and-in-between-owner-block-and-content/#post-45063 Wed, 08 Jul 2015 19:14:49 +0000 jkirker Thank you Paolo…

I’m halfway there… Here’s the code. Now to get a widget into the second area.

Anyone have any thoughts or suggestions? Is there another hook there?

If anyone else wants to do this, here’s the code:


//Create Detail Page Top Sidebar Widget to Page
register_sidebar( array(
	'id'          => 'geodir-details-sidebar-top',
	'name'        => 'GD Details Sidebar Top',
	'before_widget' => '<div class="geodir-company_info geodir-details-sidebar-top">',
	'after_widget'  => '</div>',
) );

// Add Detail Page Top Sidebar Widget to Page
function details_sidebar_top ( $sidebar_top_content ) {
	dynamic_sidebar('geodir-details-sidebar-top');
	return $sidebar_top_content;
}
add_filter( 'geodir_social_sharing_buttons_html', 'details_sidebar_top', 10, 1 );
]]>
https://wpgeodirectory.com/support/topic/add-widget-areas-to-detail-sidebar-top-and-in-between-owner-block-and-content/#post-45064 <![CDATA[Reply To: Add widget areas to detail sidebar top and in between owner block and content]]> https://wpgeodirectory.com/support/topic/add-widget-areas-to-detail-sidebar-top-and-in-between-owner-block-and-content/#post-45064 Wed, 08 Jul 2015 20:07:05 +0000 Paolo Same thing but with the second filter suggested: geodir_detail_page_more_info_html

Thanks!

]]>
https://wpgeodirectory.com/support/topic/add-widget-areas-to-detail-sidebar-top-and-in-between-owner-block-and-content/#post-45065 <![CDATA[Reply To: Add widget areas to detail sidebar top and in between owner block and content]]> https://wpgeodirectory.com/support/topic/add-widget-areas-to-detail-sidebar-top-and-in-between-owner-block-and-content/#post-45065 Wed, 08 Jul 2015 20:33:03 +0000 jkirker Thanks again. I ended up figuring it out after re-reading what you wrote.

Can you think of a way to add a widget or JS code between two Custom Fields?

I thought of maybe adding an HTML field and locking it down to admin only, however it doesn’t allow for a default value. That’s also not optimal either though should the default value be added to the database in the event it needed to be updated.

Thanks again.

]]>
https://wpgeodirectory.com/support/topic/add-widget-areas-to-detail-sidebar-top-and-in-between-owner-block-and-content/#post-45148 <![CDATA[Reply To: Add widget areas to detail sidebar top and in between owner block and content]]> https://wpgeodirectory.com/support/topic/add-widget-areas-to-detail-sidebar-top-and-in-between-owner-block-and-content/#post-45148 Thu, 09 Jul 2015 15:19:22 +0000 Stiofan O'Connor Hi jkirker,

Maybe this is the second hook u are after, just filter the html and tag on what you want?

https://wpgeodirectory.com/docs/codex/geodirectory_filters/geodir_edit_post_link_html/

Thanks,

Stiofan

]]>
https://wpgeodirectory.com/support/topic/add-widget-areas-to-detail-sidebar-top-and-in-between-owner-block-and-content/#post-45149 <![CDATA[Reply To: Add widget areas to detail sidebar top and in between owner block and content]]> https://wpgeodirectory.com/support/topic/add-widget-areas-to-detail-sidebar-top-and-in-between-owner-block-and-content/#post-45149 Thu, 09 Jul 2015 15:29:54 +0000 Stiofan O'Connor Oops i think i read that wrong, these might be the hooks you are after.


/**
                     * Called before a custom fields is output on the frontend.
                     *
                     * @since 1.0.0
                     * @param string $html_var The HTML variable name for the field.
                     */
                    do_action('geodir_before_show_' . $html_var);
                    /**
                     * Filter custom field output.
                     *
                     * @since 1.0.0
                     *
                     * @param string $html_var The HTML variable name for the field.
                     * @param string $html Custom field unfiltered HTML.
                     * @param array $variables_array Custom field variables array.
                     */
                    if ($html) echo apply_filters('geodir_show_' . $html_var, $html, $variables_array);

                    /**
                     * Called after a custom fields is output on the frontend.
                     *
                     * @since 1.0.0
                     * @param string $html_var The HTML variable name for the field.
                     */
                    do_action('geodir_after_show_' . $html_var);
]]>