Display Override Filter
-
Hello!
I believe that the conditional on
be-subpages-widget.php
Line 53 should read:if ( !is_singular( $post_types ) || !apply_filters( 'be_subpages_widget_display_override', true ) )
Instead of
&&
, and instead offalse
. So if either of the test are true, the widget drops and returns nothing to display. Otherwise the filter simply never fires.Usage example includes:
/** * Don't display subpages on this specific page * * @param Boolean $show - Whether to show the Widget * * @return Boolean $show */ function mod_be_subpages_widget( $show ) { global $post; if( is_object( $post ) && 6 == $post->ID || 6 == $post->post_parent ) { $show = false; } return $show } add_filter( 'be_subpages_widget_display_override', 'mod_be_subpages_widget' );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Display Override Filter’ is closed to new replies.