Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed cover layout issue with CPT #4295

Merged
merged 11 commits into from
Oct 28, 2024
5 changes: 4 additions & 1 deletion inc/customizer/defaults/single_post.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ public function get_cpt_context( $allowed = [ 'post', 'page' ] ) {
*/
$allowed_context = apply_filters( 'neve_allowed_custom_post_types', $allowed, 10, 1 );
$context = get_post_type();
$context = apply_filters( 'neve_context_filter', $context, 10, 1 );
if ( ! has_filter( 'neve_context_filter' ) && ! in_array( get_post_type(), $allowed_context, true ) ) {
$context = 'post';
}
$context = apply_filters( 'neve_context_filter', $context, 10, 1 );

return [ $context, $allowed_context ];
}
Expand Down
Loading