• Resolved arjunarjun

    (@arjunarjun)


    Hi team, I tried to change the order of the affiliate dashboard links but was unable. Is there any way or snippet that could do this? For example, the current menu order is this: Dashboard > commissions > visits > payments > link generator > settings.

    I want the link generator to be placed second in the order, immediately after the dashboard link. Any solution is highly appreciated.

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello there,
    we hope you’re doing well!

    In order to achieve what you need, add the following code in the functions.php file of your active child theme:

    if ( ! function_exists( 'yith_wcaf_dashboard_navigation_menu_reorder' ) ) {
        function yith_wcaf_dashboard_navigation_menu_reorder( $menu ) {
            $m1 = array_splice($menu, 5, 1);
            $m2 = array_splice($menu, 0, 1);
            $menu_reorder = array_merge($p2,$p1,$menu);
            return $menu_reorder;
        }
        add_filter( 'yith_wcaf_dashboard_navigation_menu', 'yith_wcaf_dashboard_navigation_menu_reorder', 99 );
    }

    Check it out and tell us if it works well for you, please.

    Best regards.

    Hello there,

    Sorry, there was a small error in the previous code. The correct one is this:

    if ( ! function_exists( 'yith_wcaf_dashboard_navigation_menu_reorder' ) ) {
        function yith_wcaf_dashboard_navigation_menu_reorder( $menu ) {
            $m1 = array_splice($menu, 5, 1);
            $m2 = array_splice($menu, 0, 1);
            $menu_reorder = array_merge($m2,$m1,$menu);
            return $menu_reorder;
        }
        add_filter( 'yith_wcaf_dashboard_navigation_menu', 'yith_wcaf_dashboard_navigation_menu_reorder', 99 );
    }

    Best regards.

    Thread Starter arjunarjun

    (@arjunarjun)

    Hi Juan and the support team of Yith, thank you very much for your genuinely responsible attitude toward your customers. I am pleased at the remarkable level of support you are providing even for the free version of your plugin. I wonder what would be the guidance and support for your premium version. Thank you Juan, the code worked well and I highly appreciate your effort in this connection.

    Hello Arjun,
    you’re welcome!

    Thank you very much for your words :). We try to provide the best possible support in both versions, so if at any time you get one of our premium plugins, you can send us any questions/requests that we will answer you shortly.

    Have a nice day!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Change the order of the affiliate dashboard menu links’ is closed to new replies.