GeoDirectory SupportChange navigation menu item position – GeoDirectory Support https://wpgeodirectory.com/support/topic/change-navigation-menu-item-position/feed Sun, 05 Apr 2026 19:23:10 +0000 http://bbpress.org/?v=2.5.14-6684 en-US https://wpgeodirectory.com/support/topic/change-navigation-menu-item-position/#post-29628 <![CDATA[Change navigation menu item position]]> https://wpgeodirectory.com/support/topic/change-navigation-menu-item-position/#post-29628 Tue, 03 Feb 2015 03:21:01 +0000 Y A Hi,

I would like to change the position of the items added by GDF.
For example, “Listings”, “Add Listing”, and “Change location”.

Where can I edit the position of these items?

I understand that if I want to manually add an item at the end, I should set a very high position (https://wpgeodirectory.com/support/topic/add-menu-item-after-geodirectory-menu-items/).

However, when another plugin (i.e. Buddypress) adds a menu item, it appears before the GDF menu items.

I would like it to be in the following order:
Listings – Add listing – Change Location – Buddypress item – Custom item

Thanks,
YA

]]>
https://wpgeodirectory.com/support/topic/change-navigation-menu-item-position/#post-29749 <![CDATA[Reply To: Change navigation menu item position]]> https://wpgeodirectory.com/support/topic/change-navigation-menu-item-position/#post-29749 Tue, 03 Feb 2015 16:55:26 +0000 Stiofan O'Connor Hi YA,

You just have to play with the priority’s

first remove the items from their current priorit then re-add them, for example if u wanted to reverse the order of the default GD links and the locatiosn switcher


remove_filter('wp_nav_menu_items','geodir_menu_items', 100);
add_filter('wp_nav_menu_items','geodir_menu_items', 50,2);

remove_filter('wp_nav_menu_items','geodir_location_menu_items', 110);
add_filter('wp_nav_menu_items','geodir_location_menu_items', 40, 2);

Thanks,

Stiofan

]]>
https://wpgeodirectory.com/support/topic/change-navigation-menu-item-position/#post-29766 <![CDATA[Reply To: Change navigation menu item position]]> https://wpgeodirectory.com/support/topic/change-navigation-menu-item-position/#post-29766 Tue, 03 Feb 2015 18:23:05 +0000 Paolo Hi,
let us know if we can set this as resolved.
Thanks

]]>
https://wpgeodirectory.com/support/topic/change-navigation-menu-item-position/#post-29774 <![CDATA[Reply To: Change navigation menu item position]]> https://wpgeodirectory.com/support/topic/change-navigation-menu-item-position/#post-29774 Tue, 03 Feb 2015 18:50:41 +0000 Y A Hi,

This indeed allows me to re-order GDF items (location_menu_items and menu_items).
I have tried setting the position at 1 or 40, but it still appears AFTER my normal menu-items (contact page, buddypress items).

]]>
https://wpgeodirectory.com/support/topic/change-navigation-menu-item-position/#post-29781 <![CDATA[Reply To: Change navigation menu item position]]> https://wpgeodirectory.com/support/topic/change-navigation-menu-item-position/#post-29781 Tue, 03 Feb 2015 19:16:13 +0000 Stiofan O'Connor ok to get both the GD items BEFORE the menu please remove the other bits of code and add this:


remove_filter('wp_nav_menu_items','geodir_menu_items', 100);
add_filter('wp_nav_menu_items','geodir_menu_items_mycustom', 50,2);

remove_filter('wp_nav_menu_items','geodir_location_menu_items', 110);
add_filter('wp_nav_menu_items','geodir_location_menu_items_mycustom', 60, 2);

function geodir_menu_items_mycustom($items, $args){

		$location = $args->theme_location;
		
		$geodir_theme_location = get_option('geodir_theme_location_nav');
		
		if ( has_nav_menu( $location )=='1' && is_array($geodir_theme_location) && in_array($location,$geodir_theme_location) ) {
			
			$items = geodir_add_nav_menu_items().$items;	
			return $items;
			
		}
		else
		{
			return $items;
		}
}

function geodir_location_menu_items_mycustom($items, $args)
{
	
	$location = $args->theme_location;
	
	$geodir_theme_location = get_option('geodir_theme_location_nav');
	
	if ( has_nav_menu( $location )=='1' && is_array($geodir_theme_location) && in_array($location,$geodir_theme_location) ) {
		
		$items = add_nav_location_menu_items().$items;
		
	}
	
	return $items;
}

Thanks,

Stiofan

]]>
https://wpgeodirectory.com/support/topic/change-navigation-menu-item-position/#post-29784 <![CDATA[Reply To: Change navigation menu item position]]> https://wpgeodirectory.com/support/topic/change-navigation-menu-item-position/#post-29784 Tue, 03 Feb 2015 19:21:32 +0000 Y A Thanks boss.
That worked like a charm.

Best,

YA

]]>
https://wpgeodirectory.com/support/topic/change-navigation-menu-item-position/#post-29792 <![CDATA[Reply To: Change navigation menu item position]]> https://wpgeodirectory.com/support/topic/change-navigation-menu-item-position/#post-29792 Tue, 03 Feb 2015 19:58:33 +0000 Stiofan O'Connor Great! Feel free to leave us a review https://wordpress.org/support/view/plugin-reviews/geodirectory 🙂

Thanks,

Stiofan

]]>
https://wpgeodirectory.com/support/topic/change-navigation-menu-item-position/#post-29825 <![CDATA[Reply To: Change navigation menu item position]]> https://wpgeodirectory.com/support/topic/change-navigation-menu-item-position/#post-29825 Tue, 03 Feb 2015 21:39:32 +0000 Paolo FYI, given that you are using Buddyrpess:

https://wpgeodirectory.com/support/topic/geodirectory-buddypress-integration-addon-beta-released/

Hope you like it! 🙂

]]>
https://wpgeodirectory.com/support/topic/change-navigation-menu-item-position/#post-29843 <![CDATA[Reply To: Change navigation menu item position]]> https://wpgeodirectory.com/support/topic/change-navigation-menu-item-position/#post-29843 Tue, 03 Feb 2015 23:12:30 +0000 Y A NICE. Thanks guys.
Will certainly leave a review.

– YA

]]>