This file contains 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 | |
//Use this function to create pagingation links that are styleable with Bootstrap 3 | |
function paging() { | |
global $wp_query; | |
$total_pages = $wp_query->max_num_pages; | |
if ($total_pages > 1){ | |
$current_page = max(1, get_query_var('paged')); |
This file contains 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 | |
/* | |
* The page core options for the Shoestrap theme | |
*/ | |
if ( !function_exists( 'shoestrap_module_coulourlovers_options' ) ) : | |
function shoestrap_module_coulourlovers_options( $sections ) { | |
// Page Options |
This file contains 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
function my_shoestrap_content_override() { | |
?> | |
<article <?php post_class(); ?>> | |
<?php do_action( 'shoestrap_in_article_top' ); ?> | |
<header> | |
<h1 class="entry-title"><?php the_title(); ?></h1> | |
<?php do_action( 'shoestrap_entry_meta_override' ); ?> | |
</header> | |
<div class="entry-content"> | |
<?php do_action( 'shoestrap_single_pre_content' ); ?> |
This file contains 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 | |
if ( !function_exists( 'shoestrap_css' ) ) : | |
/* | |
* Gets the css path or url to the stylesheet | |
* If $target = 'path', return the path | |
* If $target = 'url', return the url | |
* | |
* If echo = true then print the path or url. |
This file contains 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 | |
if ( $pagination == 'pager' ) : | |
if ($wp_query->max_num_pages > 1) : | |
$current_page = max(1, get_query_var('paged')); | |
?> | |
<nav class="post-nav"> | |
<ul class="pager"> | |
<li class="previous"><?php next_posts_link(__('← Older posts', 'roots')); ?></li> | |
<li class="text-center"><?php echo $current_page.' of '.$wp_query->max_num_pages; ?></li> |
This file contains 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 | |
if ( !function_exists( 'shoestrap_compiler' ) ) : | |
/* | |
* This function can be used to compile a less file to css using the lessphp compiler | |
*/ | |
function shoestrap_compiler() { | |
$minimize_css = shoestrap_getVariable( 'minimize_css', true ); | |
$options = ( $minimize_css == 1 ) ? array( 'compress'=>true ) : array( 'compress'=>false ); |
This file contains 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
/* | |
* Change homepage title | |
*/ | |
function shoestrap_new_homepage_title() { | |
echo 'My new title'; | |
} | |
function shoestrap_change_homepage_title() { | |
if (is_home()) { | |
add_action( 'shoestrap_page_header_override', 'shoestrap_new_homepage_title' ); |
This file contains 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
function remove_shoestrap_navbar_slidedown_toggle(){ | |
global $ss_settings, $ss_menus; | |
$hook_navbar_slidedown_toggle = ( $ss_settings['navbar_toggle'] == 'left' ) ? 'shoestrap_pre_content' : 'shoestrap_inside_nav_begin'; | |
remove_action( $hook_navbar_slidedown_toggle, array( $ss_menus, 'navbar_slidedown_toggle' ) ); | |
} | |
add_action( 'wp', 'remove_shoestrap_navbar_slidedown_toggle' ); | |
function my_navbar_slidedown_toggle() { |
This file contains 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_filter( 'option_active_plugins', 'disable_gridder_in_homepage' ); | |
function disable_gridder_in_homepage($plugins){ | |
$homepage = 'local.wordpress.dev/'; | |
if( ( $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']) == $homepage ) { | |
$key = array_search( 'shoestrap-gridder/shoestrap-gridder.php' , $plugins ); | |
This file contains 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
// add custom footer via shoestrap_footer_override action | |
function my_custom_footer_override() { | |
global $ss_footer; | |
?> | |
<div id="footer"> |