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 presscore_new_post_navigation( $args = array() ) { | |
if ( ! in_the_loop() ) { | |
return ''; | |
} | |
$defaults = array( | |
'prev_src_text' => __( 'Previous post:', 'the7mk2' ), | |
'next_src_text' => __( 'Next post:', 'the7mk2' ), | |
'in_same_term' => false, | |
'excluded_terms' => '', |
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 add_portfolio_tags_after_post($content){ | |
if (is_single() && 'dt_portfolio' == get_post_type() ) { | |
$tags = get_the_term_list( get_the_ID(), 'dt_portfolio_tags', '', '', ''); | |
$content .= '<div class="entry-tags">'.$tags.'</div>'; | |
} | |
return $content; | |
} |
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
<script> | |
jQuery(document).ready(function($) { | |
var delay = 300; | |
setTimeout(function() { | |
$('.the7-e-tab-title').removeClass('active'); | |
$('.the7-e-tab-text-content').removeClass('active'); | |
$('.the7-e-tab-text-content').css('display', 'none'); }, delay); | |
}); | |
</script> |
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
add_filter( 'cptui_user_supports_params', function( $supports, $post_type ) { | |
if ( $post_type === 'movies' ) { | |
$supports['hierarchical'] = true; | |
} | |
return $supports; | |
}, 10, 2 ); |
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( 'rest_api_init', 'add_album_gallery_fields' ); | |
function add_album_gallery_fields() { | |
register_rest_field( | |
'dt_gallery', | |
'album_gallery', | |
array( | |
'get_callback' => 'get_album_gallery', // custom function name | |
'update_callback' => null, | |
'schema' => null, | |
) |
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( 'presscore_taxonomy_dt_portfolio_category_args', 'my_portfolio_category_slug' ); | |
function my_portfolio_category_slug( $taxonomy_args ) { | |
$taxonomy_args['rewrite'] = array('slug' => 'my-portfolio-category'); | |
return $taxonomy_args; | |
} |
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( 'presscore_post_type_dt_testimonials_args', 'my_testimonials_slug' ); | |
function my_testimonials_slug( $args ) { | |
$args['rewrite'] = array('slug' => 'mytestimslug'); | |
return $args; | |
} |
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 presscore_new_post_navigation( $args = array() ) { | |
if ( ! in_the_loop() ) { | |
return ''; | |
} | |
$defaults = array( | |
'prev_src_text' => __( 'Previous post:', 'the7mk2' ), | |
'next_src_text' => __( 'Next post:', 'the7mk2' ), | |
'in_same_term' => false, | |
'excluded_terms' => '', |
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 presscore_new_post_navigation( $args = array() ) { | |
if ( ! in_the_loop() ) { | |
return ''; | |
} | |
$defaults = array( | |
'prev_src_text' => __( 'Previous post:', 'the7mk2' ), | |
'next_src_text' => __( 'Next post:', 'the7mk2' ), | |
'in_same_term' => false, | |
'excluded_terms' => '', |
NewerOlder