Skip to content

Instantly share code, notes, and snippets.

<?php
/*
Template Name: Blog small
*/
// We should set what we're quering for...
// http://codex.wordpress.org/Function_Reference/query_posts
query_posts('post_type=post&post_status=publish&paged='. get_query_var('paged'));
// Below is just a duplicate of index.php file
<?php
function blog_small_content() {
global $ss_framework;
echo '<article '; post_class(); echo '>';
do_action( 'shoestrap_in_article_top' );
echo '<div class="entry-summary">';
@fovoc
fovoc / functions.php
Last active August 29, 2015 14:05
Shoestrap 3.2.6 - remove page title from content-page template using Conditional Tags
<?php
// Our new content-page template (we don't need the title section in this)
function no_title_page_content() {
global $ss_framework;
while ( have_posts() ) : the_post();
//shoestrap_title_section();
do_action( 'shoestrap_entry_meta' );
do_action( 'shoestrap_page_pre_content' );
{"last_tab":"","options_mode":"advanced","logo":{"url":"","id":"","height":"","width":"","thumbnail":""},"favicon":{"url":"","id":"","height":"","width":"","thumbnail":""},"apple_icon":{"url":"","id":"","height":"","width":"","thumbnail":""},"gradients_toggle":"0","color_brand_primary":"#428bca","color_brand_success":"#5cb85c","color_brand_warning":"#f0ad4e","color_brand_danger":"#d9534f","color_brand_info":"#5bc0de","html_bg":{"background-color":"#ffffff","background-repeat":"","background-size":"","background-attachment":"","background-position":"","background-image":"","media":{"id":"","height":"","width":"","thumbnail":""}},"body_bg":{"background-color":"#ffffff","background-repeat":"","background-size":"","background-attachment":"","background-position":"","background-image":"","media":{"id":"","height":"","width":"","thumbnail":""}},"body_bg_opacity":"100","site_style":"wide","layout":"1","layout_primary_width":"4","layout_secondary_width":"3","layout_sidebar_on_front":"0","navbar_margin_top":"0","widge
@fovoc
fovoc / functions.php
Last active August 29, 2015 14:05
Shoestrap 3.2.6 & Shoestrap Woo Child 1.3
<?php
/*
* Change layout of products categories pages with a full-width view (no sidebars)
* This could be used in the wp-content/mu-plugins/ folder in order to avoid changes in Woo Child and keep up with updates
*/
function full_width_product_category_layout() {
global $ss_layout;
if ( is_product_category() ) {
@fovoc
fovoc / functions.php
Created August 19, 2014 08:04
shoestrap-3-extra-widget-areas - /includes/functions.php#L211
<?php
function shoestrap_ewa_widget_area_wrapper( $action = '', $num = 3 ) {
global $ss_framework;
if ( shoestrap_getVariable( $action . '_check' ) == '1' ) {
echo $ss_framework->open_row( 'div', null, $action.'_outer', null );
echo '<div class="'.$action.'">';
for ( $i = 1; $i < ( $num + 1 ); $i++ ) {
echo '<div class="'. $ss_framework->column_classes( array( 'medium' => 12 / $num ), null ) .'">';
dynamic_sidebar( $action . '_' . $i );
@fovoc
fovoc / functions.php
Created August 25, 2014 22:21
Shoestrap 3 - My Custom Comments Template #2
<?php
function my_custom_comments_template() {
global $ss_framework, $post, $user_identity, $wp_query;
if (post_password_required()) {
return;
}
@fovoc
fovoc / widget.php
Created August 28, 2014 10:59
Shoestrap 3 Woo child - Ajax cart in navbar (inside a text widget)
<?php
global$woocommerce;
?>
<a>cart->get_cart_url();?>" title="<?php_e('View your shopping cart','woothemes');?>"><?phpechosprintf(_n('%d item','%d items',$woocommerce->cart->cart_contents_count,'woothemes'),$woocommerce->cart->cart_contents_count);?> - <?phpecho$woocommerce->cart->get_cart_total();?></a>
@fovoc
fovoc / functions.php
Created August 28, 2014 11:00
Shoestrap 3 Woo child - Ajax cart in navbar (inside functions.php)
<?php
add_filter('add_to_cart_fragments', 'woocommerce_header_add_to_cart_fragment');
function woocommerce_header_add_to_cart_fragment( $fragments ) {
global $woocommerce;
ob_start();
?>
<a>cart->get_cart_url(); ?>" title="<?php _e('View your shopping cart', 'woothemes'); ?>"><?php echo sprintf(_n('%d item', '%d items', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count);?> - <?php echo $woocommerce->cart->get_cart_total(); ?></a>
@fovoc
fovoc / functions.php
Last active August 29, 2015 14:05
Shoestrap 3 - override navbar searchform
<?php
function my_navbar_pre_searchbox() {
global $ss_settings;
$show_searchbox = $ss_settings['navbar_search'];
if ( $show_searchbox == '1' ) : ?>
<form role="search" method="get" id="searchform" class="form-search pull-right navbar-form" action="<?php echo home_url('/'); ?>">
<label class="hide" for="s"><?php _e('Search for:', 'shoestrap'); ?></label>
<input type="text" value="<?php if (is_search()) { echo get_search_query(); } ?>" name="s" id="s" class="form-control search-query" placeholder="<?php _e('Search', 'shoestrap'); ?>">