get_post_class not working properly

An empty string is used for the glue parameter of implode(). get_post_class() will return an array, and you want to separate the array values with a space, so use this: $post_class = implode( ‘ ‘, get_post_class() ); This appears to be a bug in the WP Most Popular plugin. I submitted an issue to the … Read more

Dynamic sidebar areas not working on the Theme Customizer

Creating new query objects is not a good idea in this situation. Try simply getting the pages and using those objects to serve up the widget areas: add_action( ‘widgets_init’, ‘my_243057_widgets_init’ ); function my_243057_widgets_init() { /** * Get only published page objects * @link: https://codex.wordpress.org/Function_Reference/get_pages */ $pages = get_pages(); foreach ( $pages as $page ) { … Read more

How to Change Sort Order of default WordPress Catgory Widgets?

@Sandun why don’t you create your own widget? <?php class Category_List_Custom extends WP_Widget { /** * Sets up the widgets name etc */ public function __construct() { $widget_ops = array( ‘classname’ => ‘category_list_custom’, ‘description’ => ‘Category list custom’, ); parent::__construct( ‘category_list_custom’, ‘Category List Custom’, $widget_ops ); } /** * Outputs the content of the widget … Read more