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
//put in in functions.php in main or child theme | |
//add breadrums to main menu | |
function custom_breadcrumbs() { | |
$config = Presscore_Config::get_instance(); | |
// get breadcrumbs | |
if ( $config->get( 'page_title.breadcrumbs.enabled' ) ) { | |
$breadcrumbs = presscore_get_page_title_breadcrumbs(); | |
} else { | |
$breadcrumbs = ''; |
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 this code to main or child functions.php file | |
function presscore_get_social_icons_data() { | |
return array( | |
'facebook' => __('Facebook', 'the7mk2'), | |
'twitter' => __('Twitter', 'the7mk2'), | |
'google' => __('Google+', 'the7mk2'), | |
'dribbble' => __('Dribbble', 'the7mk2'), | |
'you-tube' => __('YouTube', 'the7mk2'), | |
'rss' => __('Rss', 'the7mk2'), | |
'delicious' => __('Delicious', 'the7mk2'), |
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('comment_post_redirect', 'redirect_after_comment'); | |
function redirect_after_comment() { | |
return 'http://example.com'; | |
} |
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
.service .btn { | |
background: none repeat scroll 0 0 transparent; | |
border: none !important; | |
color: #FFC229; | |
font-size: 3em; | |
position: absolute; | |
width: 100%; | |
height: 100%; | |
top: 0 !important; | |
left: 0 !important; |
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_filter( 'pre_get_posts', 'custom_post_search' ); | |
function custom_post_search( $query ) { | |
$post_type = get_query_var('post_type'); | |
if ( $query->is_search && !is_admin() ) { | |
$query->set( 'post_type', array( 'post', 'movies', 'products', 'portfolio', 'ai1ec_event' ) ); | |
} | |
else if ( $query->is_search && is_admin() && $post_type == 'ai1ec_event' ){ | |
$query->set( 'post_type', array( 'ai1ec_event' ) ); |
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 custom_404_page_redirect() { | |
global $wp_query; | |
if ($wp_query->is_404) { | |
wp_redirect('http://example.com',301); | |
exit; | |
} | |
} | |
add_action('wp', 'custom_404_page_redirect', 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
function dt_change_metabox_defaults() { | |
global $DT_META_BOXES; | |
if ( $DT_META_BOXES ) { | |
$box_album_options = null; | |
//find dt_page_box-album_options | |
foreach($DT_META_BOXES as &$value) { | |
if ($value['id'] === 'dt_page_box-album_options') { | |
$box_album_options = &$value; |
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 | |
/** | |
* Review order table | |
* | |
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/review-order.php. | |
* | |
* HOWEVER, on occasion WooCommerce will need to update template files and you | |
* (the theme developer) will need to copy the new files to your theme to | |
* maintain compatibility. We try to do this as little as possible, but it does | |
* happen. When this occurs the version of the template file will be bumped and |
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 able to use svg you can install following plugin https://uk.wordpress.org/plugins/svg-support/ | |
function presscore_get_logo_image( $logos = array(), $class = '' ) { | |
if ( ! is_array( $logos ) ) { | |
$logos = array( $logos ); | |
} | |
// get default logo | |
foreach ( $logos as $logo ) { | |
if ( $logo ) { |
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
//put this function in your main or child theme function.php | |
function redefine_page_title($default_page_title_strings) | |
{ | |
$my_page_title_strings = array( | |
'search' => __( 'Search Results for: %s', 'the7mk2' ), | |
'category' => __( 'Category Archives: %s', 'the7mk2' ), | |
'tag' => __( 'Tag Archives: %s', 'the7mk2' ), | |
'author' => __( 'Author Archives: %s', 'the7mk2' ), | |
'day' => __( 'Daily Archives: %s', 'the7mk2' ), | |
'month' => __( 'Monthly Archives: %s', 'the7mk2' ), |
OlderNewer