• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Chantal Coolsma

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password
  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • May 14, 2015 at 4:53 am in reply to: Cafe Pro and WPML widget issue #152142
    Chantal Coolsma
    Member

    Nobody has a solution?

    May 13, 2015 at 1:06 am in reply to: Cafe Pro and WPML widget issue #151968
    Chantal Coolsma
    Member

    It is a development site which isn't reachable from outside. This function counts the widgets, but all widgets. Also widgets which aren't shown in the frontend:

    function cafe_widget_area_class( $id ) {
    	$count = cafe_count_widgets( $id );
    
    	$class = '';
    
    	if( $count == 1 || $count < 9 ) {
    
    		$classes = array(
    			'zero',
    			'one',
    			'two',
    			'three',
    			'four',
    			'five',
    			'six',
    			'seven',
    			'eight',
    		);
    
    		$class = $classes[ $count ] . '-widget';
    		$class = $count == 1 ? $class : $class . 's';
    
    		return $class;
    
    	} else {
    
    		$class = 'widget-thirds';
    		
    		return $class;
    
    	}
    
    }
    
    May 12, 2015 at 8:33 am in reply to: Sticky Elements (Like floating Nav) #151850
    Chantal Coolsma
    Member

    You can solve this using CSS3 and a little jQuery code. I used code below for the navigation area:

    jQuery(function( $ ){
    	$(window).scroll(function() {
    		var yPos = ( $(window).scrollTop() );
    		if(yPos > 50) { // show sticky menu after screen has scrolled down 200px from the top
    			$(".nav-secondary").css({ 'position': 'fixed', 'top':0, 'left':0, 'z-index':100 });
    		} else {
    			$(".nav-secondary").css({ 'position': 'relative' });
    		}
    	});
    });

    For a nice slide in, you can use the CSS transition property.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble