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
function change_sidebar_pos() { | |
$args = array ( | |
'post_type' => 'product', | |
'post_per_page' => -1 | |
); | |
query_posts( $args ); | |
while ( have_posts() ) : the_post(); |
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 ( !class_exists('Presscore_Inc_Testimonials_Post_Type') ) { | |
class Presscore_Inc_Testimonials_Post_Type { | |
public static function register() { | |
return; | |
} | |
} | |
} |
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( 'post_type_archive_link', 'my_portfolio_archive_link', 10, 1 ); | |
function my_portfolio_archive_link( $archivelink ) { | |
if( get_post_type() == 'dt_portfolio') { | |
return get_permalink( 382 ); //replace 382 with id of your portfolio page | |
} | |
else { | |
return $archivelink; |
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
function dt_change_default_sidebar() { | |
global $DT_META_BOXES; | |
if ( $DT_META_BOXES ) { | |
if ( isset($DT_META_BOXES[ 'dt_page_box-sidebar' ]) ) { | |
$DT_META_BOXES[ 'dt_page_box-sidebar' ]['fields'][0]['std'] = 'left'; // use disabled to disable sidebar | |
} | |
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 the7_login_logout_link( $items, $args ) { | |
if( $args->theme_location == 'top' ) { | |
$loglink =""; | |
if ( ! is_user_logged_in() ) | |
$loglink .= '<li class="menu-item menu-item-type-custom menu-item-object-custom"><a href="' . esc_url( wp_login_url() ) . '"><span class="menu-item-text"><span class="menu-text">Login</span></span></a>'; | |
else | |
$loglink .= '<li class="menu-item menu-item-type-custom menu-item-object-custom"><a href="' . esc_url( wp_logout_url() ) . '"><span class="menu-item-text"><span class="menu-text">Logout</span></span></a>'; | |
$items = $loglink.$items; | |
} | |
return $items; |
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 ); |
OlderNewer