How to limit characters in Academica featured posts widget?

I am guessing that this is the theme you are talking about. If so, I don’t see any specialized filters that would let you alter the character count of the excerpt. The widget does use get_the_excerpt() so you should be able to alter the character count with Core filters though. function excerpt_trim_cb_wpse_114219($excerpt) { remove_filter(‘wp_trim_excerpt’,’excerpt_trim_cb_wpse_114219′,1000); return … Read more

Can I use widgets & shortcode if I need to return an array?

I think that your proposed solution, or plan of attack, is far more complicated than it needs to be. You can use a static variable to manage this. Proof of concept: function shortcode_with_static_data($atts,$content) { static $ids; $ids[] = time(); var_dump($ids); // you should return a string not dump data in a real shortcode } add_shortcode(‘scwsc’,’shortcode_with_static_data’); … Read more

How to show a feed that requires user/pass within a sidebar widget?

There is a solution as described here where you can put code at the top of wp-includes/feed-rss2.php to authenticate that the requester is a registered WordPress user. A better solution is to add it to your theme’s functions.php file: function my_check_feed_auth() { if (!isset($_SERVER[‘PHP_AUTH_USER’])) { header(‘WWW-Authenticate: Basic realm=”RSS Feeds”‘); header(‘HTTP/1.0 401 Unauthorized’); echo ‘Feeds from … Read more

How to display a widget available for all themes

Put all your custom widget code into a separate php file, add a plugin header: <?php /** * Plugin Name: Name Of The Plugin * Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates * Description: A brief description of the Plugin. * Version: The Plugin’s Version Number, e.g.: 1.0 * Author: Name Of The Plugin Author * Author URI: http://URI_Of_The_Plugin_Author … Read more

Big side banners

Register sidebars for the banners, then use the text widget to place your code in it. The default widget will strip some HTML code, so you may want to use something less invasive like my Unfiltered Text Widget.