Skip to content

Instantly share code, notes, and snippets.

@dancingsoda
dancingsoda / PHP Post Max Size
Created April 12, 2016 04:28
PHP Post Max Size docs
post_max_size=32M
@dancingsoda
dancingsoda / custom-attr.php
Last active July 4, 2016 09:55
for nicola
/*Default line 97-104*/
$no_sidebar = ' col-md-8';
if ( get_theme_mod( 'disable_sidebar_singular', 0 ) == 1 && is_singular() ) :
$no_sidebar = ' col-md-8 col-md-push-2 df-no-sidebar';
elseif ( get_theme_mod( 'disable_sidebar_archive', 1 ) == 1 && ( is_archive() || is_search() ) ) :
$no_sidebar = ' col-md-12 df-no-sidebar';
elseif ( get_theme_mod( 'disable_sidebar_blog', 1 ) == 1 && ( is_home() ) ) :
$no_sidebar = ' col-md-12 df-no-sidebar';
endif;
@dancingsoda
dancingsoda / index.php
Created July 4, 2016 09:56
for nicola
/*Default line 126*/
<?php get_sidebar(); ?>
/*change to*/
<?php if ( !is_single() ) { get_sidebar(); } ?>
@dancingsoda
dancingsoda / functions-header.php
Created July 12, 2016 02:53
for treasureseason
<?php
if ( ! defined( 'ABSPATH' ) ) { exit; }
/*-----------------------------------------------------------------------------------*/
/* Register WP Menus */
/*-----------------------------------------------------------------------------------*/
if ( function_exists('wp_nav_menu') ) {
add_theme_support( 'nav-menus' );
register_nav_menus( array( 'primary-menu' => __( 'Primary Menu', 'woothemes' ) ) );
jQuery(document).ready(function(a){a(".two-col-left #editor_pick, .two-col-right #editor_pick, .two-col-left #related_post, .two-col-right #related_post, .two-col-left .portfolio-items, .two-col-right .portfolio-items").owlCarousel({items:3,loop:!0,margin:28,nav:!1,responsive:{0:{items:1},600:{items:2},1e3:{items:3}}}),a(".one-col #editor_pick, .one-col #related_post").owlCarousel({items:4,loop:!0,nav:!1,responsive:{0:{items:1},600:{items:2},1e3:{items:4}}}),a("#slider").owlCarousel({items:1,loop:!0,lazyLoad:!0,nav:!0,navText:["<i class='ico-arrow-left'>","<i class='ico-arrow-right'>"]}),a(".owl-container-porfolio").owlCarousel({items:1,loop:!0,lazyLoad:!0,autoHeight:!0,nav:!0,navText:["<i class='ico-arrow-left'>","<i class='ico-arrow-right'>"]});var b=a("#container-lookbook"),c=a("#pagination_owl"),d=!1,e=300;b.owlCarousel({margin:20,items:2,nav:!1,dots:!0,responsive:{1e3:{items:2,margin:80},700:{items:2,margin:100},600:{items:1},0:{items:1}}}).on("changed.owl.carousel",function(a){d||(d=!0,c.trigger("to.owl
<?php
/*-----------------------------------------------------------------------------------*/
/* Start WooThemes Functions - Please refrain from editing this section */
/*-----------------------------------------------------------------------------------*/
// Set path to WooFramework and theme specific functions
$functions_path = get_template_directory() . '/functions/';
$includes_path = get_template_directory() . '/includes/';
@dancingsoda
dancingsoda / content-custom-archive.php
Created July 18, 2016 07:23
overwrite the old code
<?php
if ( !defined( 'ABSPATH' ) ) { exit; }
add_action( 'wp_head', 'df_ajax_custom_head' );
function df_ajax_custom_head() {
echo '<script type="text/javascript">var ajaxurl = \'' . admin_url( 'admin-ajax.php' ) . '\';</script>';
}
if ( !function_exists( 'df_custom_top_element' ) ) {
<?php
function advance_gmaps( $atts, $content = null) {
$output = $output_img = $output_img_el = $data = $parallax_class = $maps = '';
extract( shortcode_atts( array(
'height' => '400',
'latitude' => '',
'longitude' => '',
<?php
function advance_gmaps( $atts, $content = null) {
$output = $output_img = $output_img_el = $parallax_class = $maps = '';
extract( shortcode_atts( array(
'height' => '400',
'latitude' => '',
'longitude' => '',
<?php
/**
* My Addresses
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 2.2.0
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly