This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function category_layout_full() { | |
if ( is_category() ) { | |
add_filter( 'shoestrap_forced_layout', 'ssep_return_f' ); | |
} | |
} | |
add_action( 'wp', 'category_layout_full' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function move_secondary_navbar() { | |
global $ss_menus; | |
// remove secondary navbar | |
remove_action( 'shoestrap_pre_wrap', array( $ss_menus, 'secondary_navbar' ) ); | |
// place it inside the very end of main header tag | |
add_action( 'shoestrap_post_main_nav', array( $ss_menus, 'secondary_navbar' ), 1 ); | |
// leave it outside the header tag, but on the very top | |
//add_action( 'shoestrap_pre_wrap', array( $ss_menus, 'secondary_navbar' ), 1 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_shoestrap_content_override() { | |
global $ss_framework; | |
echo '<article '; post_class(); echo '>'; | |
do_action( 'shoestrap_in_article_top' ); | |
shoestrap_title_section( true, 'h2', true ); | |
if ( has_action( 'shoestrap_entry_meta_override' ) ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function category_layout_full() { | |
if ( is_category('uncategorized') ) { | |
add_filter( 'shoestrap_forced_layout', 'ssep_return_f' ); | |
} | |
} | |
add_action( 'wp', 'category_layout_full' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function navbar_sharing() { | |
global $ss_social; | |
add_action( 'shoestrap_inside_nav_begin', array( $ss_social, 'social_sharing' ) ); | |
// add_action( 'shoestrap_inside_nav_end', array( $ss_social, 'social_sharing' ) ); | |
// add_action( 'shoestrap_pre_main_nav', array( $ss_social, 'social_sharing' ) ); | |
// add_action( 'shoestrap_post_main_nav', array( $ss_social, 'social_sharing' ) ); | |
} | |
add_action( 'wp', 'navbar_sharing' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('init','random_post'); | |
function random_post() { | |
global $wp; | |
$wp->add_query_var('random'); | |
add_rewrite_rule('random/?$', 'index.php?random=1', 'top'); | |
} | |
add_action('template_redirect','random_template'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function woocommerce_get_product_thumbnail( $size = 'shop_catalog', $placeholder_width = 0, $placeholder_height = 0 ) { | |
global $post; | |
if ( has_post_thumbnail() ) { | |
echo '<a href="' . get_permalink( $post->ID ) . '" title="' . esc_attr( $post->post_title ) . '">'. get_the_post_thumbnail( $post->ID, $size ) .'</a>'; | |
} | |
elseif ( wc_placeholder_img_src() ) { | |
return wc_placeholder_img( $size ); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Remove top-bar menu in specific pages | |
*/ | |
function no_top_bar_template( $template ) { | |
if ( is_page(501) || is_home() ) { | |
add_filter( 'shoestrap_top_bar_template', '__return_false' ); | |
} else { | |
return $template; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Remove primary sidebar in 404 pages | |
*/ | |
function remove_404_sidebar() { | |
if ( is_404() ) { | |
add_filter( 'shoestrap_display_primary_sidebar', '__return_false' ); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'shoestrap_index_begin', 'gridder_wrapper_open', 999 ); | |
function gridder_wrapper_open() { | |
echo '<div id="gridder_wrapper">'; | |
} | |
add_action( 'shoestrap_index_end', 'gridder_wrapper_close', 1 ); | |
function gridder_wrapper_close() { | |
echo '</div>'; |