WordPress.org

Ready to get started?Download WordPress

Forums

Sampression Lite
[resolved] Expanded filter by default (5 posts)

  1. kentonfox
    Member
    Posted 1 year ago #

    Love this theme, it is perfect for my needs, just want to make a couple of really simple tweaks ... I hope you can help?

    1. Would love to find the section of the code to make the Homepage Filter expanded by default.

    2. How difficult would it be to add a sidebar to the homepage. Is this something you might add to a premium edition?

    Thanks

  2. 3x7
    Member
    Posted 1 year ago #

    +1

  3. hjmt
    Member
    Posted 1 year ago #

    I did a quick hack by changing the css -

    #primary-nav .sixteen {
    height:34px;

    You can see how its fully expaneded on my site http://minecraftmaps.org when loading but to close it you have to press the filter button twice. Good Luck

  4. Sampression
    Member
    Theme Author

    Posted 1 year ago #

    Hi kentonfox,

    #1 Go to the script.js file on wp-content/themes/sampression-lite/lib/js/

    and change this code

    if( minHt < ulHt ) {
      jQuery('#btn-nav-opt').show();
    }

    with:

    if( minHt < ulHt ) {
    		jQuery('#primary-nav .sixteen').animate({ 'height' : ulHt },1000,function(){
    			jQuery('#btn-nav-opt').show();
    			jQuery('#btn-nav-opt').addClass('up');
    		});
    	}

    also change the code

    jQuery('#btn-nav-opt').toggle(
    	function(){
    		jQuery('#primary-nav .sixteen').animate({ 'height' : ulHt });
    		jQuery(this).addClass('up');
    	},
    function(){
    	jQuery('#primary-nav .sixteen').animate({ 'height' : minHt } );
    	jQuery(this).removeClass('up');
    	}
    );

    with:

    jQuery('#btn-nav-opt').on( 'click', function(){
    		if(jQuery(this).hasClass('up')){
    			jQuery('#primary-nav .sixteen').animate({ 'height' : minHt });
    			jQuery(this).removeClass('up');
    		}else{
    			jQuery('#primary-nav .sixteen').animate({ 'height' : ulHt } );
    			jQuery(this).addClass('up');
    		}
    		});

    #2 We will definitely think about that on Sampression Pro.

    Thanks,

    Sampression Team

  5. sparkleflavor
    Member
    Posted 9 months ago #

    Greetings,

    Thanks so much for this awesome theme!

    I would also like to implement a static category menu (disble the filter) on the homepage, however I think the code may have changed from whats above.

    If you have a chance to update this thread, I'd be most grateful.

    Again, thanks so much!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic