Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #997581
    caligent
    Participant

    I created a plugin that presents a different menu based on someone else’s instructions. It works great for the most part, but the problem I have is that it is also overriding the footer menu when the plugin is active. Can anyone take a look at this code to see how I may be able to modify it so that it is only changing the primary nav menu and not the footer?

    Here is the code:
    <?php
    /*
    Plugin Name: Site Plugin for site.com
    Description: Site specific code changes for site.com
    */
    /* Start Adding Functions Below this Line */
    function my_wp_nav_menu_args( $args = ” ) {

    if( is_user_logged_in() ) {
    $args[‘menu’] = ‘Members’;
    } else {
    $args[‘menu’] = ‘Non-Members’;
    }
    return $args;
    }
    add_filter( ‘wp_nav_menu_args’, ‘my_wp_nav_menu_args’ );
    /* Stop Adding Functions Below this Line */
    ?>

    #997723
    Rupok
    Member

    Hey there,

    Thanks for writing in! Regretfully, this particular customization request is outside the scope of our support as this is not related to an issue with the theme and instead has to do with your customization of it. As such, you will need to investigate this particular issue on your own or seek help from a developer should you not feel comfortable making these changes yourself. If you have any further questions about the theme, we are more than happy to provide you with assistance on these inquiries.

    Thank you for your understanding.

  • <script> jQuery(function($){ $("#no-reply-997581 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>