Exclude a category from prev-next post navigation

attila729

Active member
Oct 11, 2019
117
29
28
Dear fiends,

I'm trying to exclude a category [taxonomy=portfolio_entries] (category id = 36) from a custom prev entry - next entry post navigation link.

Who can help me? thanks

$output .= '<div class="post-nav-container type1">';
$output .= get_previous_post_link('%link', '<i class="icomoon icon-Arrow-OutLeft"> </i>' .esc_html__( 'Prev Entry' , 'dtportfolioaddon' ) , true , ' ' , 'portfolio_entries' );

$output .= '</div>';
$output .= '<div class="post-archive-link-wrapper">';
$output .= '<a class="post-archive-link" href="'.get_post_type_archive_link('portfolio' ).'"></a>';

$output .= '</div>';
$output .= '<div class="post-next-link">';
$output .= get_next_post_link('%link', '<i class="icomoon icon-Arrow-OutRight"> </i>'.esc_html__('Next Entry','dtportfolioaddon' ), true , ' ' , 'portfolio_entries' );


$output .= '</div>';
$output .= '</div>';

}
 

Forum statistics

Threads
70,030
Messages
914,945
Members
244,883
Latest member
dazzous

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu