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

learn more… | top users | synonyms (1)

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
110 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
44 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
58 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
991 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
52 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
232 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
457 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
89 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
319 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
53 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
258 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
240 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
267 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
47 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
55 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
79 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
129 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
41 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
189 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
561 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
133 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
118 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? [on hold]

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. ...
0
votes
1answer
26 views

Using existing widget code! [closed]

Maybe this was answered many times but I couldn't find my answers so here I go: Am I allowed to use widgets php code from other existing themes and modify it for my needs?
1
vote
1answer
59 views

How do I add Widgets to my theme and activate them on my site?

I registered the widget area in my functions.php and they appear in my admin area but when I drag it over to the right hand panel to make changes none of them seem to do anything. Anyone know what I ...
2
votes
2answers
466 views

Full width layout for custom post type pages

I'm trying to remove a widget area called 'Primary' from a certain page on a site. This is the function where I manage the sidebars: //ADD CATEGORIES IN SIDEBAR OF SINGLE POST TYPE add_action( ...
0
votes
1answer
992 views

How to add Wrapper Div/container element around Wordpress Widget Content

I want to apply style to widget content of Wordpress but I see widget Content area is not having uniform class. TextWidget are having class "textwidget" and that is uniform but other widgets are ...
0
votes
1answer
294 views

How to pass a special CSS class into widget li

I have assigned a Sidebar into functions.php: register_sidebar( array ( 'name' => 'Footer Widgets Area', 'id' => 'footer_widgets_area', 'description' ...
1
vote
1answer
91 views

Restrict access to specific widget field based on user role

I'm looking for a way to restrict the ability to drag certain widgets to specific widget areas in the widget editor. For example, I would like to restrict the widget field 'ads' to only be available ...
0
votes
0answers
73 views

How to detect shortcode usage, submit a form from widget to that page?

I've created a plugin and now want to create a widget containing a form that will submit to the page where my plugin shortcode is embedded from any wordpress page on the front end. I assume that ...
0
votes
2answers
132 views

How to allow PHP In WordPress text widget

I want to add a text widget to my new WordPress website, but in the text widget there are some PHP snippets and I am finding it difficult to do it. Please help me Guys.
1
vote
1answer
255 views

Most commented last 24h, week, month, year and all time - posts_where

I've removed my old post here, as the posts_where method is outdated. Thanks to kaiser, this is now how easy it is to list most commented posts within a certain time span: <?php $popular = new ...
0
votes
0answers
15 views

Modify the siderbar footer

I have to update a website made with wordpress, and I can't find how to change the "sidebar footer". here's the link to the website: somatbel.be the part I want to change is right under the last ...