• Hello all,
    I have a site that is almost ready to release, but I have a few minor edits on the mobile platforms for the Homepage.

    1) Don’t show the center content area
    2) Have the left hand aside menu show

    Basically, when getting to the mobile version, the main content area is showing more prominently and is kind of duplicate of what I want to show (content from the left hand aside menu). Also how to show that left side content without having to click the hamburger menu icon, or have it expanded by default.

    Thanks!
    Brandon

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter prate012

    (@prate012)

    I have made some progress on this issue, but I still need a little assistance in expanding the hamburger menu on mobile HOMEPAGE only. The site is now live and I’m tweaking as I go – alabamaguntrader.net

    First off, I asked a friend of mine how he would do automatically expand the mobile menu and he said to just add some javascript or jQuery to do that. So I did that with jQuery (which was a learning experince) and it worked.

    But now I have found that the auto-expanded menu gets in the way when you are not on the hompage and trying to do other stuff on the site. So I tried

    1)Adding an if condition in the functions file around the “add_action” that runs the jQuery. Menu is no longer auto expanding on any mobile page:
    if ( is_front_page() ) {
    add_action( ‘wp_enqueue_scripts’,’expand_mobile_menu_by_default_on_homepage’ );
    }

    2)Tried adding the if condition in the jQuery like this. Menu no longer expands on any mobile page…
    if (jQuery(location).attr(‘alabamaguntrader.net’); ) {
    jQuery(‘.secondary-toggle’).trigger(‘click’);
    }

    Thread Starter prate012

    (@prate012)

    I also tried this in the jQuery file to no effect:
    if ( jQuery(location).attr(‘href’) == ‘http://www.alabamaguntrader.net’) {
    //click the hamburger menu
    jQuery(‘.secondary-toggle’).trigger(‘click’);
    }

    Here is the reference page I’m using for this code:
    http://stackoverflow.com/questions/406192/get-current-url-in-javascript

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to get the left hand aside to show on mobile WITHOUT the hamburger menu icon’ is closed to new replies.