Skip to content

Instantly share code, notes, and snippets.

View imemohit's full-sized avatar

Mohit Agarwal imemohit

View GitHub Profile
@thecodepoetry
thecodepoetry / functions.php
Last active January 4, 2023 17:37
Change portfolio breadcrumb archive link to your custom portfolio page
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;