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
Starting from 5.4.x The7 theme update, there was changed icon format from SVG to font. If you want to add custom social icons to the theme, you should prepare font and paste this font to child theme, then add PHP and CSS code with required modificaton to function.php and style.css child theme files. | |
To prepare font, you can use fontello.com online service, just import https://www.screencast.com/t/Hgna4hqD predefined configuration file https://www.dropbox.com/s/lbtgzmaqqxis78r/config.json?dl=0 | |
Upload own SVG file or choose icon from fontello library, then edit glyph, configure glyph name to the name that you use into PHP array https://www.screencast.com/t/GP8fSVtDZ | |
After you finish, download webfont and unpack it. | |
Copy font folder that persist into archive to the root dir of your child theme. | |
Open css/my-social-icon-codes.css and create css rules witn icon codes like this ".icon_name .soc-font-icon: { content: '\eXXX'; }" where XXX icon code. | |
How to prepare SVG | |
You can prepare SVG by using online SVG editor |
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
function my_custom_post_type_args( $args, $post_type ) { | |
if ( $post_type === "dt_team" ) { | |
$args['has_archive'] = false; | |
$args['rewrite'] = true; | |
} | |
return $args; | |
} | |
add_filter( 'register_post_type_args', 'my_custom_post_type_args', PHP_INT_MAX, 2 ); |
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
function my_filter_presscore_post_details_link( $output ){ | |
$output = str_replace( 'rel="nofollow"', '' ,$output); | |
return $output; | |
} | |
add_filter( 'presscore_post_details_link', 'my_filter_presscore_post_details_link' ); |
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
function dt_change_default_metabox() { | |
global $DT_META_BOXES; | |
if ( $DT_META_BOXES ) { | |
foreach ( $DT_META_BOXES as $key => $DT_META_BOX ) { | |
if (key_exists('id',$DT_META_BOX ) && ($DT_META_BOX['id'] === 'dt_page_box-portfolio_post_media_options') ) | |
{ | |
$DT_META_BOXES[ $key ]['fields']['0']['std'] = 'before'; |
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
function custom_presscore_do_header_slideshow( $title ) { | |
$id = get_the_ID(); | |
$myPostId = 36444; | |
if ($id !== $myPostId ) return; | |
$config = Presscore_Config::get_instance(); | |
if ( 'slideshow' != $config->get('header_title') ){ | |
return; | |
} | |
$config->set( 'page_title.breadcrumbs.enabled', true ); | |
$config->set( 'header_title', 'enabled' ); |
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
function add_after_head() { | |
?> | |
<meta name="google-site-verification" content="PLACE HERE MY CODE" /> | |
<?php | |
} | |
add_action( 'wp_head', 'add_after_head' ); |
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_footer', function () { ?> | |
<script src="//lcp360.cachefly.net/panoskin.min.js"></script> | |
<script> | |
PANOSKIN.createViewer({ | |
id: 'pano', | |
tour: 'TOUR-ID' /* Replace TOUR-ID with your tour's ID */ | |
}); | |
</script> | |
<?php } ); |
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( 'presscore_config_post_id_filter', 'dt_portfolio_archive_id_filter' ); | |
function dt_portfolio_archive_id_filter($new_post_id) { | |
if (is_post_type_archive('dt_portfolio')) | |
{ | |
$new_post_id = 84; //replace this to template post id | |
} | |
return $new_post_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 scripts to wp_footer() | |
function child_theme_footer_script() { ?> | |
<!-- Your JS/HTML goes here --> | |
<?php } | |
add_action( 'wp_footer', 'child_theme_footer_script' ); |
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('woocommerce_sale_flash', 'woo_custom_hide_sales_flash'); | |
function woo_custom_hide_sales_flash() | |
{ | |
return false; | |
} |