Sidebar Questions

Support Area Forums Selfie Sidebar Questions

Viewing 6 posts - 1 through 6 (of 6 total)
URL to the page in question: http://sustainabledcschools.org/
  • Author
    Posts
  • #17390
    Nicholas Minnich
    Participant

    Hi Bill! Hope you are doing well.

    1. Is it possible to make the sidebar visible by default, while retaining the ability to hide it?

    2. How could I best move the nav after the widget area?

    Thanks a bunch!

    #17394
    Bill Robbins
    Moderator

    Good Morning Nicholas,

    Great questions. Let’s see what we can find out about them.

    1. For the sidebar, it uses a script called pageslide.js to operate. It may be possible to alter the script to do that. I didn’t dig through the source code of it when I set it up, but you’re more than welcome to take a look at https://github.com/srobbin/jquery-pageslide/blob/master/jquery.pageslide.js to see the development version. The documentation doesn’t make mention of how you could achieve that so my guess is it wasn’t created with that functionality in mind. Sorry about that.

    2. You can move the menu after the widget section. What you’ll want to do is not assign your menu to the theme’s menu location. Then use the navigation menu widget to add in your menu via a widget. That’ll let you place it with the other widgets any way you’d like to.

    Let me know if I can help,
    Bill

    #17426
    Nicholas Minnich
    Participant

    Ah great idea regarding the navigation! It worked of course.

    Regarding the page-slide javascript, I read through the documentation and agree that there is no variable that can be manipulated to display the sidebar by default. Rather than change the javascript via FTP, do you think there is additional javascript I could put in the footer to load the sidebar? I couldn’t quite figure out what that would be. I have a hunch it has something to do with line 132.

    No pressure of course. This is probably above the call of duty as this is not your code per say. Thanks!

    #17427
    Bill Robbins
    Moderator

    Nicholas,

    You know we might be approaching this the wrong way. Instead of looking for an option in that script to have the sidebar open automatically, we might be better off to replace it with a simple jQuery toggle ( http://api.jquery.com/toggle/ ). You would need to take this out of the scripts.php file:

    
    wp_enqueue_script( 'pageslide' );
    

    and this from the custom-js.php file:

    
    	jQuery(".sliding").pageslide({
    		direction: "left"
    	});
    

    Then you’d want to change the CSS so that the sidebar is always visible. Then you could add in the jQuery to the custom-js.php to toggle its visibility. You could use the menu icon (the one with the lines) for the trigger too.

    I think that’s how I would try approaching it.

    #17429
    Nicholas Minnich
    Participant

    Worked like a charm! Thanks a lot Bill!

    #17436
    Bill Robbins
    Moderator

    That’s great news Nicholas. Have a great day and let me know if I can help with anything.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Sidebar Questions’ is closed to new replies.