GeoDirectory SupportAdd Menu Item AFTER GeoDirectory Menu Items – GeoDirectory Support https://wpgeodirectory.com/support/topic/add-menu-item-after-geodirectory-menu-items/feed Sun, 15 Feb 2026 21:17:05 +0000 http://bbpress.org/?v=2.5.14-6684 en-US https://wpgeodirectory.com/support/topic/add-menu-item-after-geodirectory-menu-items/#post-28540 <![CDATA[Add Menu Item AFTER GeoDirectory Menu Items]]> https://wpgeodirectory.com/support/topic/add-menu-item-after-geodirectory-menu-items/#post-28540 Thu, 22 Jan 2015 21:49:53 +0000 Vi Wickam Hi,

I’m using wp_nav_menu_items to add a menu item to my primary menu. I’d like this to show after all of the GeoDirectory menu items.

Getting the custom menu item to show is easy enough, but positioning it is proving elusive. Any help?

FYI, here’s the call I’m using in my functions.php file.

add_filter( ‘wp_nav_menu_items’, ‘add_login_logout_link’, 10, 2 );

Also, is there a list of actions & filters supported by GeoDirectory?

]]>
https://wpgeodirectory.com/support/topic/add-menu-item-after-geodirectory-menu-items/#post-28565 <![CDATA[Reply To: Add Menu Item AFTER GeoDirectory Menu Items]]> https://wpgeodirectory.com/support/topic/add-menu-item-after-geodirectory-menu-items/#post-28565 Thu, 22 Jan 2015 23:02:53 +0000 Paolo Hi Mike,

adding a very high number as priority (almost) always works in placing the new item as the last in the menu.

Please try this:


add_filter( 'wp_nav_menu_items', 'add_loginout_link', 9999, 2 );

We only started writing the documentation about hooks and filters this week.
http://docs.wpgeodirectory.com/category/dev/core-docs/hooks/

We finally have an almost stable list and we hope to complete it by end of February. We have over 150 docs to write.

For anything needed in the mean time, please don’t hesitate to ask.

Thanks

]]>
https://wpgeodirectory.com/support/topic/add-menu-item-after-geodirectory-menu-items/#post-28567 <![CDATA[Reply To: Add Menu Item AFTER GeoDirectory Menu Items]]> https://wpgeodirectory.com/support/topic/add-menu-item-after-geodirectory-menu-items/#post-28567 Thu, 22 Jan 2015 23:35:01 +0000 Vi Wickam >>adding a very high number as priority (almost) always works in placing the new item as the last in the menu

That worked. Thanks. (I was on the right track, but didn’t try a high-enough priority.)

A related question:

How do I get GeoDirectory menu items to show in a widget area, instead of — or in addition to — the Primary Navigation Menu location?

FYI, I’m using a Genesis theme (Minimum Pro, if it matters).

Thanks!

Mike

]]>
https://wpgeodirectory.com/support/topic/add-menu-item-after-geodirectory-menu-items/#post-28576 <![CDATA[Reply To: Add Menu Item AFTER GeoDirectory Menu Items]]> https://wpgeodirectory.com/support/topic/add-menu-item-after-geodirectory-menu-items/#post-28576 Thu, 22 Jan 2015 23:47:51 +0000 Paolo That is a bit more complex and requires Stiofan to have a look for you.
The topic is flagged for him.
Thanks

]]>
https://wpgeodirectory.com/support/topic/add-menu-item-after-geodirectory-menu-items/#post-28640 <![CDATA[Reply To: Add Menu Item AFTER GeoDirectory Menu Items]]> https://wpgeodirectory.com/support/topic/add-menu-item-after-geodirectory-menu-items/#post-28640 Fri, 23 Jan 2015 16:33:54 +0000 Stiofan O'Connor Hi Mike,

What menu items? You could alwasy add them as custom menu items?

Stiofan

]]>
https://wpgeodirectory.com/support/topic/add-menu-item-after-geodirectory-menu-items/#post-28645 <![CDATA[Reply To: Add Menu Item AFTER GeoDirectory Menu Items]]> https://wpgeodirectory.com/support/topic/add-menu-item-after-geodirectory-menu-items/#post-28645 Fri, 23 Jan 2015 17:04:58 +0000 Paolo Given that our script only hooks to a menu lcation, we could be looking at a complex solution to solve a simple problem.

You could use the shortcode [geodir_location_tab_switcher] for the location switcher in a text widget (add this in your theme’s functions.php to make text widgets shortcode ready:

add_filter('widget_text', 'do_shortcode');

) and custom menu widget with custom links for the rest.

Easier than adding functions.

Let us know,

Thx

]]>
https://wpgeodirectory.com/support/topic/add-menu-item-after-geodirectory-menu-items/#post-28655 <![CDATA[Reply To: Add Menu Item AFTER GeoDirectory Menu Items]]> https://wpgeodirectory.com/support/topic/add-menu-item-after-geodirectory-menu-items/#post-28655 Fri, 23 Jan 2015 18:16:16 +0000 Vi Wickam >>What menu items? You could alwasy add them as custom menu items?

Thanks. That will work.

>>You could use the shortcode …

Thanks. That will work, too.

]]>
https://wpgeodirectory.com/support/topic/add-menu-item-after-geodirectory-menu-items/#post-28669 <![CDATA[Reply To: Add Menu Item AFTER GeoDirectory Menu Items]]> https://wpgeodirectory.com/support/topic/add-menu-item-after-geodirectory-menu-items/#post-28669 Fri, 23 Jan 2015 19:29:48 +0000 Vi Wickam >>You could use the shortcode …

Well, that sort of works. The shortcode expands as expected, but it’s happening out of sequence.

I’ve set the title for the text area to

“Change Search Location”

And added the shortcode. The shortcode expands, but is unexpectedly showing BEFORE the title.

I tried adding a <div> </div> around the shortcode, but the shortcode is expanding before the <div>.

I also tried moving the title into the text area, but got a similar result: shortcode expands first, then the hand-coded <h3> title.

Any thoughts?

Again, using Genesis here.

]]>
https://wpgeodirectory.com/support/topic/add-menu-item-after-geodirectory-menu-items/#post-28679 <![CDATA[Reply To: Add Menu Item AFTER GeoDirectory Menu Items]]> https://wpgeodirectory.com/support/topic/add-menu-item-after-geodirectory-menu-items/#post-28679 Fri, 23 Jan 2015 21:34:50 +0000 Vi Wickam I may see the problem. The function referenced by the shortcode looks like produces output using echo. If true, this is problematic:

From http://codex.wordpress.org/Function_Reference/add_shortcode

Note that the function called by the shortcode should never produce output of any kind. Shortcode functions should return the text that is to be used to replace the shortcode. Producing the output directly will lead to unexpected results. This is similar to the way filter functions should behave, in that they should not produce expected side effects from the call, since you cannot control when and where they are called from.

]]>
https://wpgeodirectory.com/support/topic/add-menu-item-after-geodirectory-menu-items/#post-28680 <![CDATA[Reply To: Add Menu Item AFTER GeoDirectory Menu Items]]> https://wpgeodirectory.com/support/topic/add-menu-item-after-geodirectory-menu-items/#post-28680 Fri, 23 Jan 2015 21:42:13 +0000 Paolo Hi Mike,

thanks for spotting this, I’ve asked Stiofan to look into it. I’m sure it’s an easy fix.

Thanks

]]>