Widgets are configurable elements used to dynamically build sections of a WordPress theme.

learn more… | top users | synonyms (1)

0
votes
1answer
382 views

Widget select option not saving

I do this widget but the selected options dont saving when updated. This is the code: /* CUSTOM POSTS LIST */ class Posts_list extends WP_Widget { function Posts_list() { /* Widget ...
0
votes
1answer
838 views

is_active_sidebar() Always Returns False

I've never gotten is_active_sidebar() to work, no matter if there's widgets in the sidebar or not I always get false returned. Currently I'm creating a sidebar for each top level page: ...
0
votes
1answer
2k views

Show Woocommerce Product “attributes/extra information tab” in widget [closed]

I have a question concerning WP in combination with WooCommerce, I hope someone can help me out. When viewing a product on the site I would like the "extra information tab" (containing all the ...
0
votes
1answer
155 views

Can't work out why widget contents disappear from admin

everytime I make a change to any widgets in admin they disappear - sometime just from admin, sometimes from the frontend and sometimes both. I get them back by adding update_option( ...
0
votes
1answer
290 views

Widget title markup in register_sidebar

How come the markup I specify in the 'before_title' and 'after_title' settings of register_sidebar gets applied to the default text WordPress widget but not one of our custom widgets, when both are in ...
0
votes
2answers
165 views

How to hide widget from certain category

I need some way to hide theme built in widget from one category.So when the post is from category X on that post hide that widget. I would use plugin for it, but since it's not drag and drop widget I ...
0
votes
1answer
101 views

How to get class from widget area

So... I registered my widget areas with this code: register_sidebar( array( 'name' => __( 'Posts Widget Area', 'ikos' ), 'id' => 'primary-widget-area', 'class' => ...
0
votes
1answer
52 views

My widget won't update its values when save is clicked

So this is my first attempt a creating a widget that has a functionality of creating a simple image rollover effect (if anyone wants it when it's done, leave me a message). Now I downloaded a sample ...
0
votes
1answer
14 views

When adding a widget, what kind of widget should I used to add images and text and styling?

Is there such a thing? I would settle for images, text and maybe headers. I know I can add HTML into the text widget. So is that what I should be doing? But how do I add images to the site? That ...
0
votes
1answer
177 views

Conditional widget_form_callback

I have attempted to develop a way to set something in a widget only if the widget exists in a specific sidebar. The code below looks for sidebar called 'footer' and shows the select option above the ...
0
votes
2answers
339 views

Remove/Hide a Widget on a Custom Template

i want to make a custom template using Genesis.. I added a custom Menu just by adding a widget on WIDGETS section and placed it on the top right side of the page. But i want it to be removed in a ...
0
votes
1answer
109 views

Infinite-Scroll Plugin and Jetpack Infinite Scroll Plugin - Adding to “Thoughts” Theme

How do I enable infinite scroll (either with the infinite-scroll plugin OR the built in infinite scroll jetpack) on the "Thoughts" Wordpress theme? I'm a total noob at editing this stuff so if you ...
0
votes
1answer
43 views

How to display a widget on a page with no theme?

I would like only a widget to appear on a page, is this possible? As in if I created a page, I am wondering if I can make a page just display the widgets contents with no headers, sidebars, just ...
0
votes
1answer
53 views

Wordpress dynamic widget by location?

i need to show the widget based on user location , for a testing purpose i have created the by using following code if( function_exists( 'register_sidebar' ) ) register_sidebar( array( ...
0
votes
1answer
557 views

How to hide custom sidebar on mobile

So I have made some customizations to my wordpress premium theme,but I want to hide those customizations on mobile versions. I've tried to add id of widget inside @media with display:none; but ...
0
votes
1answer
521 views

Sidebar widgets - dynamic CSS : problem with widget-title

Fortunately or unfortunately without much studying I made a dynamic sidebar widget area for my client's website. My functions.php codes are: ... register_sidebar( array ( 'name' => 'Left ...
0
votes
1answer
91 views

How to conditionally add a widget via a hook in functions.php

I'm trying to add some widget areas to the homepage only using functions.php - so that the client won't be able to accidentally destroy shortcode when editing the page. I've registered the widget ...
0
votes
1answer
884 views

Widgets menu does not appear under “Appearance” in dashboard

I am developing a WordPress theme, but am stuck on widgetizing my theme. I have followed several tutorials but still cannot get it to work. My widgets menu does not appear under Appearance in my ...
0
votes
1answer
410 views

Creating a custom wordpress widget and stopping js from running twice(once in active widget once in widget selector)?

Ok so here's the question how do i stop js from running twice on the widget.php page? I am creating a ajax loaded custom image selector from a domain on the same server as the current site. I want ...
0
votes
1answer
959 views

Wordpress: Apply filter/hook to a particular sidebar widgets?

I'm developing a theme that has more than 5 different sidebars and I want to apply a function to a particular one of them for styling purposes. Basically, the function will modify it's params using a ...
0
votes
1answer
304 views

Adding a single text input field to a custom Dashboard widget

I have a client whom I want to give as much Dashboard control over the admin area as possible. I know how to create a custom dashboard widget that contains just text/html but I have no idea how to ...
0
votes
1answer
41 views

widget not displayed

the command echo '<pre>';print_r(wp_get_sidebars_widgets()) ; returns [sidebar-page] => Array ( [0] => execphp-5 [1] => simple-section-nav-3 ...
0
votes
1answer
130 views

Dynamically creating multiple widgets from Mustache templates

I built a bunch of basic Mustache templates for a project, and now I'm wanting to effectively make them available to WordPress as widgets. //This uses Composer to manage dependencies (Mustache). ...
0
votes
1answer
132 views

Simple form to add custom links to menu?

I currently have a menu set up called "sidebar links" with 5 custom URLs. In my widgets section I have a Custom Menu which shows my "sidebar links" menu. This basically gives my sidebar 5 links. ...
0
votes
2answers
218 views

Unable to add widgets to sidebars in custom theme

I'm trying to add a footer area to wordpress so I can drop widgets and things there. I see my footer area in the admin section, but if I add a text (or any other) widget and then save it, nothing ...
0
votes
1answer
308 views

how to show only particular category post in archive widgets

i want to display blog category month list in archive widgets. but i i can't figure out yet how. i have more category like review, gallery etc. normally show all month list in archive widgets but i ...
0
votes
2answers
650 views

how can i display all youtube videos from a users youtube account

I want to display all recently uploaded youtube videos from my youtube account as a widget on the right side of the page. Just like how technobuffalo.com has done. Is there such a plugin that will do ...
0
votes
1answer
30 views

Link a widget or find the php that creates the widgets

I would like to make the entire widget a link. Ideally, I would like to find the php file that has created the widget and then modify that. Q: Is there a way to backtrace the HTML to find what php ...
0
votes
1answer
84 views

Override widget in function WordPress

Im trying to override the text widget in WordPress. My code looks like this: class WP_Widget_Text_Custom extends WP_Widget { function __construct() { $widget_ops = array('classname' ...
0
votes
1answer
164 views

disbale default widgets on theme activation

I want to deactivate all default widgets on theme activation which are active by default for new WordPress installation. I'm using following function as callback for theme activation : if ( ...
0
votes
2answers
76 views

random reason on refresh

I am editing the sidebar widgets and have added one for users who are not logged in or registered. the widget requests that users register or login and I am wanting to add a random reason (quote) as ...
0
votes
1answer
59 views

How to change widget's form color in admin?

I have a simple question. How to change widget's form color in admin panel of wordpress (on widgets page) to make them more unique? Here is a simple example:
0
votes
1answer
308 views

how to extend a WP_widget twice

Has someone ever tried to extend calss WP_Widget, then extend it again ? Having to related widgets, I tried to create the first extending WP_Widget, : class FirstWidget extends WP_Widget { public ...
0
votes
2answers
179 views

Is there a way to allow only certain type of widgets in the sidebars?

For example, I want Sidebar A to display nothing but one text widget and Sidebar B to display anything but text widgets. How can I do that? Thanks.
0
votes
2answers
403 views

register child class in another plugin

I think this should be relatively easy, but somehow I cannot figure out how to do this. essentially there's a preexisting plugin that does this: add_action('widgets_init', create_function('', ...
0
votes
1answer
264 views

How Do I include/Import a Custom Widget from the Parent theme into My Child Theme?

I'm trying to make a small modification to a custom widget that was included with a clients parent theme. Whenever I remove the parents version of the widget (for testing purposes) the child version ...
0
votes
2answers
274 views

Widget to show posts in the sidebar basing on its IDs

I am trying to create a widget that displays posts in the sidebar taking post IDs as input from the user. The result of my code is that the widget displays just the first entered ID and ignores the ...
0
votes
1answer
108 views

Creating a dynamic class name in my custom widget

I have been currently building a custom widget in WordPress based on the text widget as a starting point. It seems that within the function __construct part of the widget, the class name is a hard ...
0
votes
1answer
67 views

Add a select-option to the default widgets

I would like to add an extra feature to one of the default widgets so that the user can choose from the select-field to either align the widget to the left, center or to the right. How would I be ...
0
votes
1answer
196 views

How to Get Admin Settings for a widget when using the_widget() with custom widget

I have searched around for an answer to this question and I found this: Manual display of widget which gave me a solution of: if(function_exists('the_widget')) { $instance = get_option( ...
0
votes
1answer
194 views

accessing wordpress serialized data outside wp

I've never worked with serialized data... I need a little help with how to load "text" widgets title and content in php script outside wordpress... my script just connects to database (including ...
0
votes
1answer
457 views

How to add Ajax to the default widget calendar to support next/previous months loading?

I want to customize or replace the default calendar, similar to the default widget, but with Ajax next and previous months loading. Ideally I would like to be able to do that (red dots are dates ...
0
votes
1answer
195 views

Want to add more option in “Sexy Login”

I am using Sexy Login in my new website. Its a beautiful plugins. But i need to add some more options. I want to add more button for both who are logged in & who are not logged in like "Write New ...
0
votes
1answer
206 views

How do I exclude portrait pictures from the nextgen gallery sidebar widget?

I have a gallery that contains both landscape and portrait pictures and want the gallery to be displayed in the wordpress sidebar. The problem is that the thumbnails of the portraits are scaled into ...
0
votes
2answers
27 views

How to test if the widgetized area has any widgets?

I making a widgetized footer with three widgetized areas (footer1, footer2, footer3), The problem is that even if there's no widgets assigned to any widgetized footer area, the footer is still there ...
0
votes
1answer
27 views

prevent custom widget file names from showing in Appearance > Editor

I've setup a few custom widgets for my theme, and when I go into Appearance > Editor, the widget file names are showing up in the list of files that can be edited. How can I prevent these widget file ...
0
votes
2answers
184 views

Add html after the first widget in a sidebar

Just wondering is it possible to add HTML code after the fisrt widget in a sidebar so that it would only show once and not repeat after a second or third widget is added? This is what I have so far: ...
0
votes
1answer
47 views

Accessing widget information

I'm trying to access widget information saved in the wp_options table. I printed it out: add_filter('the_content', function(){ $res = get_option('widget_my_widget'); print_r($res); }); And ...
0
votes
1answer
83 views

Trouble accessing a multidimensional array to add classes to default WordPress widgets

I've been writing up a function to assign classes to default WordPress widgets that I choose. After a bunch of research and modifications, I came up with the function below. A quick explanation of ...
0
votes
1answer
38 views

Stuck with sidebar registering

I tried to add a custom page to my Wordpress template. That part is good. What I´m stuck with is a common sidebar that appears although I registered a custom sidebar for it. I am calling the ...