Container element in Overall count widget missing
-
Please add a container element in your Overall count widget output, maybe like the standard WordPress Text widget and/or similar to your Popular Posts widget.
Also maybe check if
$titleis empty when addingbefore/after_title, see example in WordPress Text widget.Current code:
$output = $args['before_widget'];
$output .= $args['before_title'] . $title . $args['after_title'];
$output .= \WebberZone\Top_Ten\Counter::get_post_count_only( 1, 'overall', 0 );
$output .= $args['after_widget'];Suggested fix:
$output = $args['before_widget'];
if ( ! empty( $title ) ) {
$output .= $args['before_title'] . $title . $args['after_title'];
}
$output .= '<div class="textwidget tptn-text-only">';
$output .= \WebberZone\Top_Ten\Counter::get_post_count_only( 1, 'overall', 0 );
$output .= '</div>';
$output .= $args['after_widget'];Top 10 4.1.1, WordPress 6.8.2
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.