Hot answers tagged

3

Your have created three sidebars and that are primary_widget_area, secondary_widget_area, footer_widget_area But in the sidebar, you call a different sidebar name sidebar-3; that's why your sidebars are not displaying. Try the following code in sidebar.php: // To display primary_widget_area sidebar <?php if ( is_active_sidebar( 'primary_widget_area' ) ...


3

This is a known issue and will be taken care of soon, assuming you are using the "Twenty Eleven" theme: see this link. The bundled Twenty Eleven theme has some styling issues for pages with sidebars (See Trac ticket #36510)


3

Sidebars are stored in global variable $wp_registered_sidebars. You can get the sidebar properties using this variable. global $wp_registered_sidebars; if ( isset( $wp_registered_sidebars['sidebar-2'] ) ) { echo $wp_registered_sidebars['sidebar-2']['name']; } Note that do not use it too early, either on/after widgets_init hook or in a template ...


3

On my default calendar widget I get: <td id="today">30</td> so you could use #today. It uses the get_calendar() function where we have the following: if ( $day == gmdate( 'j', $ts ) && $thismonth == gmdate( 'm', $ts ) && $thisyear == gmdate( 'Y', $ts ) ) { $calendar_output .= '<td id="today">'; } else { ...


2

Widgets should only be manipulated by users, and in general they should not be deleted because there is no version control for them. Therefor I suggest you rethink first before reading further. Widgets are located in two places in the DB, the sidebar_widgets option is an array of sidebars, indexed by the sidebar id. Each sidebar is represented by an array ...


2

Without actually knowing what you're trying to achieve I see the following problems: $post variable is not defined in your widget() method. Try setting it using $post = get_post( get_the_ID() ) for instance. By the time you call foreach ($posts as $post) { ... } $posts variable is also not set. You need some query for this one I guess - WP_Query() or ...


2

From your site i can say that script is not being loaded because of wrong opening quote for script tag.Use " instead of ” So <script src=”http://lookbook.nu/widget/profile.js?id=2303472&width=standard&align=left&stats_fans=1&fanbox=yes&hash=14575a9cd02fd36d2758e5db3cb92b5a”></script> Should be this <script ...


1

You can add a Shortcode using the built-in text widget. To get the widget to process Shortcodes, add the following filter in your theme's functions.php: add_filter( 'widget_text', 'do_shortcode' ); This will result in widget text being passed thru do_shortcode, which will render any Shortcodes embedded in the text. Just note that this may not work for all ...



Only top voted, non community-wiki answers of a minimum length are eligible