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
add_action('__after_header', 'my_map', 20); | |
function my_map(){ | |
/* use page slug or name or id */ | |
if ( ! is_page('sample-page') ) | |
return; | |
/* Shortcode example from https://wordpress.org/plugins/wp-flexible-map/installation/ */ | |
$map = '[flexiblemap center="-34.916721,138.828878" width="100%" height="400px" zoom="9" title="Adelaide Hills" description="The Adelaide Hills are repleat with wineries."]'; | |
echo do_shortcode($map); | |
} |
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
$page_fpc = array( | |
'2' => array( | |
'per_row' => 3, | |
'fp' => array( | |
'one' => '8', | |
'two' => '9', | |
'three' => '10', | |
'4' => '12', | |
'5' => '7' | |
), |
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
add_filter('tc_opt_tc_single_post_thumb_location', 'show_post_thumb'); | |
function show_post_thumb( $opt ){ | |
//posts id | |
$my_posts = array( | |
1, | |
2, | |
3, | |
); | |
return is_single( $my_posts ) ? $opt : 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
add_filter('tc_show_single_post_content', 'thumbnails_css_in_pages'); | |
function thumbnails_css_in_pages( $bool ){ | |
global $wp_current_filter, $post; | |
if ( is_page() && isset( $post ) && ! in_array( '__loop', $wp_current_filter) ) | |
return true; | |
return $bool; | |
} | |
/* do not copy the following in your child-theme functions.php*/ | |
/* Following code must be copied in your child-theme style.css without the comments */ |
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
add_filter('fpc_img_id', 'my_fp_imgs', 20, 3); | |
function my_fp_imgs( $fpc_img_id, $fp_single_id, $featured_page_id){ | |
$page_img = array( | |
// page_id => img_id | |
'2' => '37', | |
); | |
if ( array_key_exists($featured_page_id, $page_img) ){ | |
return $page_img[$featured_page_id]; | |
} |
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
add_filter('tc_slide_title_tag', 'swap_h1_h2'); | |
add_filter('tc_tagline_tag', 'swap_h1_h2'); | |
function swap_h1_h2( $tag ){ | |
global $wp_current_filter; | |
$search_replace = array( | |
'h1' => 'h2', | |
); | |
if ( current_filter() == 'tc_tagline_tag' ){ | |
if ( tc__f('__is_home') && in_array('__navbar', $wp_current_filter ) ) |
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
add_filter('tc_display_customizr_headings', 'display_headings_in_archives', 20); | |
function display_headings_in_archives( $bool ){ | |
return is_archive() ? false : $bool; | |
} | |
add_filter('tc_archive_header_class', 'my_tax_header_class', 100 ); | |
function my_tax_header_class( $_title ){ | |
return is_archive() ? array('archive-header') : $_title; | |
} | |
add_filter('tc_headings_archive_html', 'my_tax_title_description', 100 ); | |
function my_tax_title_description( $_title ){ |
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
add_action('template_redirect', 'grid_one_category'); | |
function grid_one_category(){ | |
if ( ! is_category('test') ) | |
return; | |
/* Enable the grid */ | |
add_filter('tc_is_grid_enabled', '__return_true'); | |
/* Enable the Pro grid effects */ | |
add_filter('tc_is_grid_customizer_enabled', '__return_true'); | |
} |