1

i use uber menu plugin for my theme. my theme (pointfinder) require manual integration code.It works perfectly, but I would turn it off completely on the mobile I used the following form (if else)to disable it and got an error. sorry I'm not a dev.

<?php
function pointfinder_menucolumn_get(){
?>
    <div class="col-lg-9 col-md-9" id="pfmenucol1">
        <div class="pf-menu-container">


    if ( wp_is_mobile() ) {
            <nav id="pf-primary-nav" class="pf-nav-dropdown clearfix">
                <ul class="pf-nav-dropdown pfnavmenu pf-topnavmenu">
                    <?php pointfinder_navigation_menu ();?>
                    <?php 
                        if (PFPBSIssetControl('general_postitembutton_status','','1') == 1) {
                    ?>
                    <li id="pfpostitemlink" class="main-menu-item  menu-item-even menu-item-depth-0 menu-item menu-item-type-post_type menu-item-object-page current-menu-ancestor current-menu-parent current_page_parent current_page_ancestor menu-item-has-children">
                      <a class="menu-link main-menu-link">
                          <div class="postanitem-inner">
                              <span class="pfadmicon-glyph-478"></span><?php echo PFPBSIssetControl('general_postitembutton_buttontext','','Post an Item');?>
                          </div>
                      </a>
                    </li>
                    <?php 
                        }; 
                    ?>
                </ul>
            </nav>  
    <?php                                               
    }
    else {

        if ( function_exists( 'ubermenu' ) ): 
            if ( PFPBSIssetControl('general_postitembutton_status','','1') == 1) { ?>
                <div id="pfpostitemlink" >
                    <a class="menu-link main-menu-link">
                        <div class="postanitem-inner">
                            <span class="pfadmicon-glyph-478"></span><?php echo PFPBSIssetControl('general_postitembutton_buttontext','','Post an Item');?>
                        </div>
                    </a>
                </div>
            <?php 
            };

            ubermenu( 'main' , array( 'theme_location' => 'pointfinder-main-menu' ) ); 

            else: 

            ?>
                <nav id="pf-primary-nav" class="pf-nav-dropdown clearfix">
                    <ul class="pf-nav-dropdown pfnavmenu pf-topnavmenu">
                        <?php 
                            pointfinder_navigation_menu ();
                            if (PFPBSIssetControl('general_postitembutton_status','','1') == 1) {
                        ?>
                        <li id="pfpostitemlink" class="main-menu-item  menu-item-even menu-item-depth-0 menu-item menu-item-type-post_type menu-item-object-page current-menu-ancestor current-menu-parent current_page_parent current_page_ancestor menu-item-has-children">
                            <a class="menu-link main-menu-link">
                                <div class="postanitem-inner">
                                    <span class="pfadmicon-glyph-478"></span><?php echo PFPBSIssetControl('general_postitembutton_buttontext','','Post an Item');?>
                                </div>
                            </a>
                        </li>
                        <?php 
                            };
                        ?>
                    </ul>
                </nav>   
<?php       
    endif; 
    }
?>

for manual integration use this:

http://sevenspark.com/docs/ubermenu-3/theme-integration/pointfinder

thk a lot

1
  • Please add your code directly into your post. I see you have done a lot of edits, and it seems code formatting in your post is an issue, you can check this which will help you to learn how to properly format code in posts ;-) Commented Jan 19, 2016 at 10:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.