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
if ( ! function_exists( 'presscore_post_navigation' ) ) : | |
/** | |
* Next/previous post buttons helper. | |
* | |
* Works only in the loop. Sample options array: | |
* array( | |
* 'wrap' => '<div class="paginator-r inner-navig">%LINKS%</div>', | |
* 'title_wrap' => '<span class="pagin-info">%TITLE%</span>', | |
* 'no_link_next' => '<a href="#" class="prev no-act" onclick="return false;"></a>', |
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
//to exclude a custom post type | |
function remove_portfolio_search() { | |
global $wp_post_types; | |
$wp_post_types['dt_portfolio']->exclude_from_search = true; | |
} | |
add_filter('pre_get_posts','remove_portfolio_search'); | |
//To exclude some specific post | |
add_filter( 'pre_get_posts', 'cp_filter_search' ); |
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
add_action( 'wp_before_admin_bar_render', 'remove_theme_options', 999 ); | |
function remove_theme_options() { | |
if ( ! is_admin() ) { | |
global $wp_admin_bar; | |
$wp_admin_bar->remove_node('options-framework-parent'); //theme options | |
$wp_admin_bar->remove_node('presscore-icons-bar'); //icon bar | |
} | |
} |
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 | |
/** | |
* Default Events Template | |
* This file is the basic wrapper template for all the views if 'Default Events Template' | |
* is selected in Events -> Settings -> Template -> Events Template. | |
* | |
* Override this template in your own theme by creating a file at [your-theme]/tribe-events/default-template.php | |
* | |
* @package TribeEventsCalendar | |
* |
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
add_action( 'get_header', 'dt_global_footer', 10 ); | |
function dt_global_footer() { | |
$config = Presscore_Config::get_instance(); | |
$footer = $config->get( 'footer_show' ); | |
if(!$footer) { | |
$config->set( 'footer_show', 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
add_action( 'get_header', 'tribe_event_fix', 10 ); | |
function tribe_event_fix() { | |
if ( 'tribe_events' == get_post_type() ) { | |
$config = Presscore_Config::get_instance(); | |
presscore_config_base_init(); | |
} | |
} |
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
function dt_add_event_metaboxes() { | |
global $DT_META_BOXES; | |
if ( $DT_META_BOXES ) { | |
foreach ( array( 'dt_page_box-sidebar', 'dt_page_box-footer', 'dt_page_box-header_options', 'dt_page_box-slideshow_options', 'dt_page_box-fancy_header_options' ) as $mb_id ) { | |
if ( isset($DT_META_BOXES[ $mb_id ], $DT_META_BOXES[ $mb_id ]['pages']) ) { | |
$DT_META_BOXES[ $mb_id ]['pages'][] = 'tribe_events'; | |
} |
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
add_filter( 'dt_menu_options', 'cp_custom_menu_filter' ); | |
function cp_custom_menu_filter( $options = array() ) { | |
global $post; | |
if ( 'primary' == $options['location'] ) { | |
if(is_page( 35 )) { //if page id 35 |
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
add_action( 'get_header', 'dt_archive_sidebar', 10 ); | |
function dt_archive_sidebar() { | |
$config = Presscore_Config::get_instance(); | |
if(is_archive() || is_category() ){ | |
$config->set( 'sidebar_position', 'right' ); | |
$config->set( 'sidebar_widgetarea_id', 'sidebar_1' ); | |
} |
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
add_action( 'get_header', 'dt_disable_sidebar', 10 ); | |
function dt_disable_sidebar() { | |
$config = Presscore_Config::get_instance(); | |
$config->set( 'sidebar_position', 'disabled' ); | |
} |
OlderNewer