Skip to content

Instantly share code, notes, and snippets.

@ThierryA
Last active November 25, 2015 06:00
Show Gist options
  • Save ThierryA/4fa3a64fee1871b32abd to your computer and use it in GitHub Desktop.
Save ThierryA/4fa3a64fee1871b32abd to your computer and use it in GitHub Desktop.
Beans: sticky primary sidebar.
<?php
// Do not include the opening php tag if it is already included in your file.
add_action( 'beans_uikit_enqueue_scripts', 'beans_child_uikit_enqueue_scripts' );
function beans_child_uikit_enqueue_scripts() {
beans_uikit_enqueue_components( array( 'sticky' ), 'add-ons' );
}
beans_wrap_inner_markup( 'beans_sidebar_primary', 'beans_child_sidebar_primary_inner', 'div', array(
'data-uk-sticky' => '{boundary: true, top: 40}',
'data-uk-grid-margin' => ''
) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment