Here’s a patch that will fix this..
@@ -117,16 +117,12 @@
$show = isset( $instance[ 'type-' . $type . '-archive' ] ) ? $instance[ 'type-' . $type . '-archive' ] : false;
} else if ( is_archive() ) {
$show = isset( $instance['page-archive'] ) ? $instance['page-archive'] : false;
- } else if ( is_single() ) {
+ } else if ( is_singular() ) {
+
$type = get_post_type();
- if ( $type != 'page' && $type != 'post' ) {
- $show = isset( $instance[ 'type-' . $type ] ) ? $instance[ 'type-' . $type ] : false;
- }
-
- if ( ! isset( $show ) ) {
- $show = isset( $instance['page-single'] ) ? $instance['page-single'] : false;
- }
-
+
+ $show = isset( $instance[ 'type-' . $type ] ) ? $instance[ 'type-' . $type ] : false;
+
if ( ! $show ) {
$cats = get_the_category();
foreach ( $cats as $cat ) {
@@ -353,7 +349,7 @@
</div>
<?php if ( ! empty( $this->cposts ) ) { ?>
- <h4 class="dw_toggle" style="cursor:pointer;"><?php _e( 'Custom Post Types', 'display-widgets' ) ?> +/-</h4>
+ <h4 class="dw_toggle" style="cursor:pointer;"><?php _e( 'Post Types', 'display-widgets' ) ?> +/-</h4>
<div class="dw_collapse">
<?php
foreach ( $this->cposts as $post_key => $custom_post ) {
@@ -603,7 +599,6 @@
'front' => __( 'Front', 'display-widgets' ),
'home' => __( 'Blog', 'display-widgets' ),
'archive' => __( 'Archives'),
- 'single' => __( 'Single Post'),
'404' => '404',
'search' => __( 'Search'),
);