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

learn more… | top users | synonyms (1)

0
votes
0answers
17 views

How do you get a valid DateTimeZone when the user has it set to a custom timezone?

Taking a look at this question: How to get WordPress Time Zone setting?, I see that I can use get_option('timezone_string'); to get a time zone string to use in my WordPress widget. I want to pass ...
2
votes
0answers
31 views

Why won't my custom widget stay in the sidebar after a reload?

After I drag my custom widget into a widget area and reload the page it's gone. Any ideas? <?php add_action('widgets_init','register_postTypeWidget'); function register_postTypeWidget(){ ...
0
votes
1answer
147 views

how to call new widgets in sidebar in custom theme?

I am developing a theme in which I want to call available widgets ex. Calendar and the installed plugin, I have put it in the sidebar from widget panel but can't see in frontend. Sidebar.php Code-> ...
0
votes
0answers
21 views

My Email Newsletter plugin will not configure when I try to import the widget

I am currently using the "Spun" theme for my website and bluehost as my hosting product. I downloaded and activated the "Email Newsletter" plugin, however when I try to import the widget it does not ...
0
votes
1answer
78 views

How do I pass arguments to dashboard widget callback functions?

I'm struggling to use the $callback_args parameter of wp_add_dashboard_widget successfully. The following code keeps displaying string(0)"" when dumping $args: add_action( 'wp_dashboard_setup', ...
0
votes
0answers
89 views

Wordpress Multisite add widget on new blog

I need to put widget in sidebar when new blog is creating. My code is: function make_default_widgets($blog_id, $user_id, $domain, $path, $site_id, $meta) { switch_to_blog($blog_id); ...
0
votes
0answers
22 views

Modify link in widget archive

I want to add Google campaign to link in default wordpress widget archive. How can I do this?
0
votes
1answer
57 views

What conditional to use for dynamic sidebar check?

I have looked here on WA and also on the codex but there is no definitive source that I could find. Which is the proper/best way to check to see if a dynamic_sidebar is active and contains a widget? ...
5
votes
2answers
95 views

Retrieve each widget separately from a sidebar

I would like to retrieve each widget existing in a sidebar in order e.g. to mix them with posts inside the main loop. I know I can use different widget areas (sidebars) but this approach clutters the ...
1
vote
1answer
39 views

Registering a stylesheet inside my WordPress widget

I did see the other topic similar to this but I cannot get mine to work. I am using WordPress 3.8 and am creating a custom widget for a site. I need to style it a certain way so I need to load an ...
0
votes
4answers
1k views

Programmatically Add Font-Awesome Icons to Category Widget

I use the Categories widget on my sidebar(s) and I would like to display a Font Awesome icon next to each category listed in the widget. The icon would be the same for all categories, for now, but I ...
1
vote
1answer
112 views

How i can widget ID get after drag for wordpress with jquery?

I create custom widget with select option image but first time selected option image are not showing after saving this function work perfectly,I need this function only load after Drag in sidebar ...
0
votes
1answer
46 views

Customizing the Widget content markup

I am using bootstrap to create panels for the sidebar widgets, and I can set the container markup for the widget, as well as the markup for the panel header, but I cannot provide the markup for the ...
1
vote
3answers
171 views

right_now_content_table_end function not working?

I noticed recently my custom counts for custom post types are not showing on the dashboard. Im using this function: right_now_content_table_end It worked well before, Im not sure when it stopped ...
0
votes
1answer
60 views

Template from scratch: Sidebars not showing widget

I have an issue wherein i have a plugin (newsletter) which has a widget whereby users can (usually) subscribe to a newsletter and other functionality. But i digress. I have been trying to create ...
0
votes
1answer
36 views

Name Input from widget displays Sidebar name instead of saved data

I wasn't sure how to title this question,so I apologize. Let me first state that I have no experience with this type of code but I really need to this feature for my website, so I appreciate all the ...
1
vote
1answer
1k views

Create Image Uploader for Widget

I found this post// Use Media upload in custom widget on wordpress 3.5 I'm not experienced in any of this so I pretty much just copied the code he provided into my own functions.php file. I uploaded ...
0
votes
0answers
84 views

Foundation and Wordpress Footer Widgets

I'm trying to use Zurb's Foundation 5 and I have the following code that works great, IF, using 4 footer widgets because Foundation uses a 12 column grid. $sidebars = array('Footer'); foreach ...
1
vote
1answer
53 views

Why does my widget break other widgets?

So this widget i created is killing all other widgets registered in the same sidebar. Meaning, nothing renders after this widget does. No other widget markup makes it to the DOM. After hours of hair ...
6
votes
2answers
235 views

How can I use the built in Wordpress “browse link” functionality?

I'm coding a widget and I'd like the user to be able to pick a link like you can when editing a regular posts or page (when you click on the little link icon and you get the AJAX search functionality ...
0
votes
0answers
57 views

Title after content dynamic_sidebar

Is there a configuration to change the dynamic_sidebar widget's title order? I want to display title after the content. I used JavaScript to swap it at page load and looking for a robust -- tangible ...
6
votes
1answer
472 views

Extend WordPress 3.8 Site Activity Dashboard Widget to include more comments

The new Site Activity dashboard widget defaults to showing 5 comments. I'd like to show 10. I can see the code in core /wp-admin/includes/dashboard.php where it calls the function ...
0
votes
1answer
93 views

Best way to add internal link in widget

I'm looking for a way to transform a static piece of code into a widget to display in different sidebars containing a simple internal link. The basic code is: <div class="my-link-box"> <a ...
0
votes
0answers
16 views

Using widgets on an options page?

hopefully someone more experienced can help me out with this idea I've got... I'm working on a new theme, and I'd like this to be widgetised. I've done this before using the regular widgets/sidebar ...
1
vote
1answer
338 views

Adding WordPress colorpicker in widget settings

I want to add the WordPress default colorpicker in widget settings form. Here's what I'm trying: In my functions.php, I have this: function widgets_scripts( $hook ) { if ( 'widgets.php' != $hook ...
0
votes
1answer
38 views

How to include a file only on dashboard widgets page?

I want to add some styles to the widgets input fields. Therefore I want to include a style.css file only on the wp-admin/widgets.php page. How can I detect the above page and include file there?
0
votes
0answers
17 views

Need an idea of how to realize filling of accordion by editors

I have and accordion (something like this one but smaller). I already made one. OK. But I can fill it only using WordPress built-in theme editor (just changing php). My customer don't like this ...
16
votes
2answers
4k views

Wordpress 3.8 - Dashboard 1 Column Screen Options

With the new Wordpress 3.8 under Screen Options they seem to have misplaced the "Columns" feature where you could put your widgets into 1 Column, 2 Columns, 3 Columns, or 4 Columns. My question is how ...
0
votes
1answer
55 views

Wordpress - show number of comments for each post in widget

I have installed a plugin that lets me put a PHP code into the widget - basically, what I want to do is to create a "recent posts" area, where you can see a cover of the post (featured image's ...
0
votes
0answers
54 views

JQuery Accordion Menu Widget Expand All on Mobile?

Can anyone tell me how to/if it would be possible to set up this plugin so that when it's being viewed on the desktop, it works as usual (hover to expand) but when being viewed on mobile, the menu ...
0
votes
1answer
263 views

Multiple entries in get_option results? or why is _multiwidget set to 1?

I am developing a wordpress widget, and need to store some user configuration values, that is why I am using wordpress update_option and get_option. I am new to widget development. I have some ...
0
votes
0answers
71 views

register_sidebar() will not wrap an element properly

I am trying to add a widget for for some reason I cant wrap an element around the widget. Here's the html in the index.php: <article class="intro-widget"> <p> ...
0
votes
0answers
11 views

which code helps to display new widgets (first font page widgets)?

how to make new widgets(First font page widgets,second..). i found this code .. it shows the default sidebar. <div id="secondary" class="widget-area" role="complementary"> <?php ...
0
votes
1answer
247 views

How to avoid the <div> and <ul> which added when custon menu widget is used

I need to remove the custom menu widget <div class="menu-main-container"> <ul id="main" class="menu"> from appearing above the <li>. Because of this two lines my menus are not ...
0
votes
1answer
45 views

Widget : html 2 dimensional array doesn't work

I have some strange trouble with my WordPress today : I want to store same multiple values in a widget, so I create something like this : myCollection[id][myField] as input's name for my admin widget ...
4
votes
1answer
273 views

Using wp_category_checklist in a widget

I'm trying to use wp_category_checklist in a widget to display a list of checkboxes which, when saved, remain ticked. I'm having awful trouble at the moment getting them to save, as as far as I know ...
-1
votes
1answer
39 views

Widget does not work with WooCommerce enabled

I have created a widget here https://gist.github.com/joshbenham/e03c35313282c6ac402a For some reason when WooCommerce is enabled it will not save the extra fields (greatest, great and good). I have ...
0
votes
1answer
48 views

Need help using a filter on the default Categories widget

I need to add the "All Categories" item to the default WP categories widget. I can see that there's a filter that I can hook into in the core (line 485 default-widgets.php). ...
0
votes
0answers
56 views

Add a popup message on frontend?

I want to show a box or a widget with HTML content at the bottom of a page to show the reader a message s/he can dismiss. Here is an example: Can one of the built-in JavaScript libraries be used ...
0
votes
1answer
86 views

register_sidebar 'after_widget' on custom-built widgets not implementing, caused nested widgets

In registering my sidebar I want each widget wrapped in <aside>. This works fine when using the inbuilt widgets like Calendar or search, however, when I add widgets I have created myself, the ...
0
votes
1answer
135 views

how to remove the default title of Categories widget

hi i'm using the Categories widget show hierarchy. I leave the space for title because I don't need to show any title. but it then displays on the website as "Categories". how can I remove that?
0
votes
0answers
43 views

How can I get the sidebar id on the current page?

How can I get the sidebar id on the current page? The question is simple. I have looked at is_active_sidebar(), is_dynamic_sidebar() but they don't provide the info that I need.
0
votes
0answers
194 views

Shortcodes in widget titles: attributes include quotes which are html encoded, why?

I wrote a shortcode plugin that works with widget titles. So I added shortcode support to widget titles like this: add_filter('widget_title', 'do_shortcode'); So my shortcode looks like this: ...
0
votes
1answer
577 views

Display custom widget value in header.php

I am using the code below for a custom widget. I have added some fields in the widget like: Title, Name and a checkbox. Now everything is fine but I want to show those values in header.php. Any idea ...
0
votes
1answer
137 views

Adding Widgets to Reactor Theme (based on Foundation 4)

How do I change the footer area to have three widget areas? The Reactor Theme has one footer widget area. It separates into three columns if more than one widget is added but I find that difficult ...
0
votes
1answer
23 views

Page full of widgets?

Is it possible to create a page which is just lots of widgets? most WP sites I see the widgets are in the sidebars, but I want a page which is just widgets and nothing else. The theme I'm currently ...
0
votes
1answer
42 views

call widget from within shortcode

I have a shortcode in my functions.php which runs a query on a category. I want to have a twitter feed on this particular page. I have a javscript option working on my page for twitter right now but ...
0
votes
0answers
22 views

Move Jetpack Stats dashboard widget to right side

is there anyway to move this? I've followed the instructions in the WP docs to no avail.. / / Global the $wp_meta_boxes variable (this will allow us to alter the array). global $wp_meta_boxes; // ...
0
votes
1answer
123 views

Assign default widgets to all sites in a multisite network

I created a widget for sidebar and footer in wordpress multiuser site. I want to make the widgets assigned in MAIN WIDGET AREA and SECONDARY WIDGET AREA by default when new site's created. Is there ...
0
votes
0answers
99 views

Does w3 total cache cache widgets? [closed]

I wish to know whether using w3 total cache also caches widgets on the sidebar? I have a recent activity widget on the sidebar that displays live activity on the site like user joining, sharing etc. ...