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('wp_head', 'change_fp_ids'); | |
function change_fp_ids(){ | |
add_filter('fpc_featured_pages_ids', 'my_fp_ids', 20); | |
function my_fp_ids( $fp_ids ){ | |
// Allowed users | |
$allowed = array( | |
// Page/Post name => list of allowed users | |
'Blog' => array( |
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
body:not(.single-post) #content > article { | |
padding: 15px 20px; | |
margin: 0 0 25px; | |
background: #ffffff none repeat scroll top left; | |
background-image: none; | |
border: solid 6px #9800cb; | |
-moz-box-shadow: 0 0 5px rgba(0, 0, 0, .1); | |
-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .1); | |
-goog-ms-box-shadow: 0 0 5px rgba(0, 0, 0, .1); | |
box-shadow: 0 0 5px rgba(0, 0, 0, .1); |
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
if ( class_exists('MCI_footnotes') ): | |
function re_enqueue_footnotes_script() { | |
// first dequeue it | |
wp_dequeue_script('mci-footnotes-js-jquery-tools'); | |
// enqueue it after tc-scripts | |
wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url() . '/footnotes/js/jquery.tools.min.js', array('tc-scripts') ); | |
} | |
add_action( 'wp_print_scripts', 're_enqueue_footnotes_script', 100 ); | |
endif; |
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
// Adds a widget area. | |
if (function_exists('register_sidebar')) { | |
register_sidebar( array( | |
'name' => 'Extra Header Widget Area', | |
'id' => 'extra-header-widget-area', | |
'description' => 'Extra widget area after the header', | |
'before_widget' => '<div class="widget my-extra-header-widget">', | |
'after_widget' => '</div>', | |
'before_title' => '<h2>', | |
'after_title' => '</h2>' |
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_post_slides', 'add_custom_slides', 10, 2); | |
function add_custom_slides( $slides, $img_size){ | |
$slides = is_array( $slides ) ? $slides : array(); | |
/* | |
* set this as an empty array if you don't want slides before this way: | |
* $my_slides_before = array(); | |
*/ | |
$my_slides_before = array( | |
'my_316' => array( // replace my_316 with my_ID_of_your_attachment | |
'title' => 'Some 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_filter('tc_show_post_metas', 'disable_metas_in_search', 20); | |
function disable_metas_in_search( $bool ){ | |
if ( is_search() ) | |
return false; | |
return $bool; | |
} |
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('wp_head', 'change_fp_ids'); | |
function change_fp_ids(){ | |
add_filter('fpc_featured_pages_ids', 'my_fp_ids', 20); | |
function my_fp_ids( $fp_ids ){ | |
$role_page = array( | |
// Role => Page/Post name | |
'administrator' => 'Blog', | |
'editor' => 'A', | |
); | |
// do nothing if in admin backend or in the customize |
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
<?php | |
/* | |
* Template Name: Page of Posts | |
*/ | |
/* Configuration */ | |
$design_layout = 'grid'; /* or alternate */ | |
$show_page_title = true; /* or false */ | |
$number_of_posts = 0; /* -1 stays for unlimited, 0 will use the Maximum number of posts per page settings */ | |
/* bind a page to a category*/ |
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_theme_support( 'html5', array( 'search-form' ) ); | |
add_action('__after_header', 'my_woocommerce_search_form'); | |
function my_woocommerce_search_form(){ | |
$search_form = '<div class="row-fluid"><div class="my-search-box span12">' . get_search_form(false) . '</div></div>'; | |
echo $search_form; | |
} | |
/* part to copy into the custom css or child-theme style.css DO NOT COPY INTO THE CHILD THEME functions.php ! | |
.my-search-box{ | |
padding: 20px 10px; | |
-webkit-box-sizing: border-box; |
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('__before_content_title', 'show_date_before_title'); | |
function show_date_before_title(){ | |
$show_in_pages = false; | |
if ( method_exists('TC_post_metas', 'tc_get_meta_date') && ! ( is_page() && ! $show_in_pages ) ) | |
echo TC_post_metas::$instance->tc_get_meta_date(); | |
} |