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.

Page full of widgets?

Evidently this is not as much of a mystery as I first thought. Here’s 2 links. http://www.wpbeginner.com/plugins/how-to-add-wordpress-widgets-in-post-and-page-content/ http://wordpress.org/plugins/widgets-on-pages/

Adding Widgets to Reactor Theme (based on Foundation 4)

Note in the code you gave for sidebar-footer.php <?php if ( is_active_sidebar(‘sidebar-footer’) ) : ?> …is always going to return false since that no longer exists. Since this is a custom theme you can probably just comment out or remove that line and it’s endif pair since I trust you always want the markup to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)