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 | |
// Show Page Id In Admin panel | |
add_filter('manage_posts_columns', 'posts_columns_id', 5); | |
add_action('manage_posts_custom_column', 'posts_custom_id_columns', 5, 2); | |
add_filter('manage_pages_columns', 'posts_columns_id', 5); | |
add_action('manage_pages_custom_column', 'posts_custom_id_columns', 5, 2); | |
function posts_columns_id($defaults){ | |
$defaults['wps_post_id'] = __('ID'); | |
return $defaults; |
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 | |
/** | |
* Allow shortcodes in WP text widgets | |
*/ | |
add_filter('widget_text', 'do_shortcode'); | |
?> |
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 in loop or single, has to access post_content | |
*/ | |
$pattern = get_shortcode_regex(); | |
preg_match('/'.$pattern.'/s', $post->post_content, $matches); | |
if (is_array($matches) && $matches[2] == 'smart_track_player') { | |
$shortcode = $matches[0]; | |
echo do_shortcode($shortcode); | |
} |
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
.col-ms-1, | |
.col-ms-2, | |
.col-ms-3, | |
.col-ms-4, | |
.col-ms-5, | |
.col-ms-6, | |
.col-ms-7, | |
.col-ms-8, | |
.col-ms-9, | |
.col-ms-10, |
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 | |
/** | |
* Create post loop query | |
*/ | |
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1; | |
$args = array( | |
'post_type' => 'post', | |
'orderby' => 'menu_order', | |
'order' => 'ASC', | |
'showposts' => 3, |
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
/* Grid Variables */ | |
$grid-columns: 12; | |
$grid-max-width: 1920px; | |
/* Break Points */ | |
$breakpoint-xs: "screen and (min-width: 320px)"; | |
$breakpoint-ms: "screen and (min-width: 480px)"; | |
$breakpoint-sm: "screen and (min-width: 768px)"; | |
$breakpoint-md: "screen and (min-width: 1024px)"; | |
$breakpoint-lg: "screen and (min-width: 1280px)"; |
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 Default Custom Fields To Posts | |
* Note: This is just an example. | |
*/ | |
add_action('wp_insert_post', 'set_default_custom_fields'); | |
function set_default_custom_fields($post_id){ | |
// slides can be post or any custom post type | |
if ( $_GET['post_type'] == 'slides' ) { | |
add_post_meta($post_id, 'subtitle', '', true); |
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 | |
// woocommerce cart disable requirement of payment | |
add_filter('woocommerce_cart_needs_payment', '__return_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
/** woocommerce remove elements **/ | |
remove_action( 'woocommerce_before_main_content','woocommerce_breadcrumb', 20, 0); | |
remove_action( 'woocommerce_before_shop_loop','woocommerce_result_count', 20, 0); | |
remove_action( 'woocommerce_before_shop_loop','woocommerce_catalog_ordering', 30, 0); | |
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 ); | |
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 ); | |
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 ); | |
remove_action( 'woocommerce_after_single_product_summary','woocommerce_output_product_data_tabs', 10, 0); |
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 | |
try { | |
/** | |
* AllClients Account ID and API Key. | |
*/ | |
$account_id = esc_html( get_theme_mod( 'all_clients_id' ) ); | |
$api_key = esc_html( get_theme_mod( 'all_clients_token' ) ); | |
//print_r($options); |