How do I use wp_editor() in widget form?

I stumbled across this solution a while back; this might be what you are looking for: I added this to my theme’s functions.php file… // First, I created a shortcode for a function, that would typically be inserted in to a template file, so that it could be inserted in to a widget. add_shortcode(‘myshortcode’, ‘myfunction’); … Read more

CSS not affecting widget output

The problem was due to an incorrect file path in the movieposterdisplay-scripts file. Whilst the file loaded correctly in the main php file require_once(plugin_dir_path(__FILE__).’/includes/movieposterdisplay- class.php’); as it already assigned the correct plugin folder name. It did not enqueue correctly as the code was wp_enqueue_style(‘mpd-main-style’, plugins_url().’/movieposterdisplay/css/style.css’); and I had previously changed the folder name. Hence I … Read more

Displaying info in a sidebar

You don’t need CPT’s to display custom information. You could use custom fields (you may need to enable them in the screen options at the top of the post edit window). You’d just need to include the custom fields in your loop but position them so they appear over the sidebar. Their information would be … Read more

If has $title in widgets

Should be possible like this: <?php /** @see WP_Widget::widget */ function widget( $args, $instance ) { extract( $args ); $title = apply_filters( ‘widget_title’, $instance[‘title’] ); # >>>> NEW if ( ! isset( $title ) OR empty( $title ) ); return; # <<<< NEW echo $before_widget; if ( $title ) echo $before_title . $title . $after_title; … Read more

How do I make the category sidebar widget (stock) display the total # of posts including those in subcategories?

This isn’t THE answer, but it’s one answer. Quick fix: Have my clients check two boxes whenever they use a sub-category. (sub-category box + parent category). This will ensure the post-count is correct. Events [x] Meals and Mission [x] Would love a fix that didn’t depend on clients checking both boxes all the time.