Tagged Questions

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

learn more… | top users | synonyms (1)

0
votes
0answers
17 views

Adding repeatable fields used in Widgets?

How can adding repeatable fields used in Widgets? I want add (Add more country favorites fields) and remove (Example ... France) what I actually Have what I want Any tips?
0
votes
1answer
26 views

Widget & storing a Select box choice

I am creating a simple widget which displays all of the pages on the website. The trouble I am having is how to store the user's choice and display it on the front end. At the moment, when saving my ...
0
votes
1answer
19 views

Warning: Creating default object… when altering Customize panels

I'm trying to move my theme's [only] widget area outside of WP 4.0's nested "Widgets" panel by doing the following: $footer_widgets_section = $wp_customize->get_section( ...
0
votes
1answer
67 views

Display Posts by Views (Popular Posts Widget)

I am trying to display the most popular posts based off of this, but I don't think it is working properly. When you view a post it seems to add 1 view to each of them, not just the unique ID. ...
0
votes
2answers
66 views

Twenty Twelve Widget Taking Space

I am using the twenty twelve theme and in this theme I used the Main Sidebar for widgets. I used the code below to make the widgets disappear in my homepage ( front page ). The code works however, the ...
0
votes
1answer
50 views

Make single widget area top level in 4.0 Customize Panel

So I have a widget area that, in v4.0, is burried in a dropdown within the secondary Widgets panel on the Customize panel page. Because it's the only widget area it feels rather silly being burried ...
0
votes
1answer
22 views

Registered widget is showing up collapsed in the dashboard

I have registered two widgets in my functions.php file; however, the second one (#footer-ad) isn't showing up in the dashboard. function mobile_mix_widgets_init() { register_sidebar( array( ...
0
votes
0answers
29 views

Radio buttons in widgets

What I'm trying to do is to create 2 radio boxes in my widget admin panel and save the one that's checked in the widget instance. For that I've set the name and the id of the input like this : ...
2
votes
1answer
52 views

How do I add a widget programmatically to a newly created site (WPMU) within a plugin?

I'm making a plugin that creates new sites (WPMU), and also has its own widget that needs to be placed onto the new sites it creates. The issue I'm having is that I can't get the plugin to insert ...
0
votes
1answer
20 views

Can I get variable into dynamic sidebar?

How can I get a variable into a sidebar? $sidebarnum = 4; dynamic_sidebar('Footer Widget $sidebarnum'); ?>`
0
votes
1answer
14 views

Register a widget area when a theme option has been saved?

Is it possible to register a widget area and sidebars when an option has been selected and saved in a theme options panel? I am using a framework called redux but am not too sure if this can be ...
1
vote
1answer
14 views

php to add a link into wp widget without specific url

I'm trying to write a plugin to a specific page that the plugin creates. The issue is how do i add a link to that page from the widget. I know the page but the url has to be picked up from the site it ...
1
vote
1answer
28 views

How to get my plug-in, wrote in php, to refresh on its own every 5 minutes?

I wrote a plugin with custom widgets for the Dashboard. It retrieves information from an XML file, and display the information into the widget. The XML file will be modified a bit every few minutes or ...
0
votes
0answers
18 views

User editable blocks per page

I'm pretty sure this question has been asked a million times but I can't seem to find an answer. Imagine a page template with multiple sidebars. What I want the site admin to be able to do is create ...
1
vote
1answer
37 views

Allow shortcode for custom widget

The following code allows shortcode parsing for 'text' widget: add_filter('widget_text', 'do_shortcode'); How to make a similar one for a custom widget? I tried the following one but it didn't ...
0
votes
0answers
16 views

Can you create your own widgets and use them for editable areas of client content?

I'm relatively new to WordPress. As a content management system I chose WordPress so that I could design a website for a friend in a way that would be easy for them to use when I had handed it over. ...
1
vote
1answer
29 views

How to make this change without changing the core? [duplicate]

I couldn't find a way to change this in an upgrade friendly way, and I know I mustn't touch the core! I need to change the value 'number' to 10 in wp-includes/default-widgets.php wp_tag_cloud( ...
0
votes
1answer
43 views

Trigger Submit Event when Widget is added to Sidebar

I need to trigger the submit or "Save" button for a widget when the widget is added to a specific sidebar in the backend. The reason for this is I am setting a certain taxonomy for a Dropdown Menu ...
0
votes
0answers
8 views

Server Side Includes not working in text widget

I'm trying to add Server Side Include code to a WordPress text widget, but the content is not being displayed. I've added SSI before on my non-WP site, but for some reason its not working with my WP ...
1
vote
3answers
64 views

Using jQuery in widget development

I'm working on a widget that do some magic with jQuery (slide,fades elements). The problem is that the jQuery script attached to widget is not called when I delete and then replace the widget in the ...
0
votes
1answer
101 views

How to echo Widget Title in Custom Frontend-Template Box

I've created a custom Widget with the help of following code: // Creating the widget class wpb_widget extends WP_Widget { function __construct() { parent::__construct( // Base ID of ...
0
votes
1answer
42 views

latest posts-widget displays all posts on archive page but works great anywhere else

I noticed the latest posts widget in my footer displaying all posts. Anywhere else on my page, it displays only the amount of posts it should. I am using a custom theme and this is my archive.php: ...
0
votes
1answer
35 views

Wordpress wiget admin panel

I'm trying to achive this thing in wordpress wiget admin panel : http://jsfiddle.net/George02/mkuxcwf5/1/ The problem is that the jQuery seems to not work . public function form( $instance ) { ?> ...
0
votes
2answers
37 views

How can I only show a widget prior to a specific date?

I can't find a solution for this anywhere, so help is highly appreciated! The problem is, that my Dropbox account is losing aboz 48 GB's, so I had to remove my podcast episodes from there... because ...
0
votes
0answers
20 views

Filter “widget_comments_args” won't work

I used "widget_comments_args" for changing comments query for Recent Comments, but it won't work. add_filter( 'widget_comments_args', 'my_function_name' ); function my_function_name( $comment_args ) ...
0
votes
0answers
62 views

Working widget does not show up in appearance->widgets

I try to add a custom widget for use outside of a normal sidebar. For that I have created class myfirst which extends WP_Widget and with appropriate function overrides. namespace widget; class ...
0
votes
0answers
30 views

How can I embed a .php file inside of a widget?

I have a currency exchange that I'm trying to put in the sidebar of my Wordpress site. The currency exchange is a simple php file that I'm trying to 'embed' as a widget. I created a simple plugin, ...
0
votes
1answer
33 views

Default Wordpress widgets always appear

I added only 3 Widgets to my sidebar, however when I set their visibility to hidden in post pages they disappear but ALL the default widgets appear. I want to remove the default widgets from appearing ...
0
votes
1answer
21 views

Remove default WordPress widgets

Hey guys here is the problem I have added 2 sidebars to my blog, however when I change their visibility to only appear on front page and when I click on a specific post ALL of the default widgets ...
0
votes
0answers
31 views

Widget options are not updated

I'm creating a plugin which creates a widget with some options. I've extended the WP_Widget class: class Dynamic_Player_Widget extends WP_Widget { function Dynamic_Player_Widget() { ...
0
votes
0answers
15 views

Enqueue script in Widget

I am trying to use wp_enqueue_script inside function widget of the Widget class. But it seems like when I print html it doesn't handle the javascript functions which I enqueue before. This enqueue ...
0
votes
0answers
20 views

Widget form method does not work properly

I need your help. I have this code <?php class Messenger extends WP_Widget { function __construct() { $widget_ops = array('name' => 'Messenger', 'description' ...
1
vote
1answer
57 views

How do you create dynamic customised sections in Wordpress?

I am very new to Wordpress and I just like to ask a fundamental question about its structure. I understand that Wordpress uses different files as templates for different sections or types of pages. ...
1
vote
2answers
64 views

Cannot save widgets in custom sidebars

I'm working on a child theme of the Toolset Bootstrap Theme. I need to create a custom sidebar, so I registered the new sidebar in my child theme's function.php file: function ...
0
votes
0answers
33 views

How to change the title (name) color of new custom widgets in backend

I created a few custom widgets. The following part of the code set up the title (name) and description. How can i include a class for the widget title (name) to change the color of the name that ...
0
votes
1answer
46 views

Check which registered sidebar a widget is added to

I have 2 registered sidebars in my theme one for Products and one for Blog. What I am trying to do is if my "Category" widget is added to the Product Sidebar the taxonomy is automatically set to ...
-1
votes
1answer
48 views

How to make custom dashboard widget to display alert in front-end?

I need to make a widget to display any alert in front end The widget is in dashboard section on backend and any user can use yet. The content of the widget in dashboard is: Welcome message On/off ...
0
votes
1answer
32 views

Why is the phone number a hyperlink on desktop sites, in my widget?

Here is the widget function from a widget I created. For the phone number, I don't understand why it is making it into a hyperlink on desktop sites, using the value of the if before ($gplus) for the ...
0
votes
0answers
18 views

How can I hide the dashboard widgets using install.php

I have created my own install.php file in the wp-content folder and I am using it as a drop in to customise my install of Wordpress. Currently I am using the following to hide (NOT) remove the ...
0
votes
0answers
22 views

Show sidebar from custom meta value

I want to show sidebar from meta value.Basically I am using wp-page-widget.Now I want to show the active widget.Since I am working on one page template so general procedure will not work. Upon ...
0
votes
1answer
27 views

Customise the Category Widget

Similar to my Search Widget question Is there a way to customise the Categories Widget? Again trying to add in extra markup. Thanks
0
votes
1answer
169 views

Paginate recent posts widget

I've created a clone of the core Recent Posts widget as suggested here Code for Recent Posts Widget, but how would I go about adding pagination to that widget? I intend on using auto-pagination for ...
1
vote
1answer
39 views

Insert Widget option into mark-up with register_sidebar

I have added a custom field to my all widgets in my theme, called "custom-title". I have managed to save the field into the database for each widget, like so: s:12:"custom-title";s:17:"HELLO TEST ...
0
votes
2answers
52 views

How to determine if the sidebar is empty? Or not active?

I used is_sidebar_active('NameOfSidebar'), but it seems not working. It returns false all the time. I wanna have a condition that goes like this if('sidebar is not active'){ //must not display the ...
0
votes
1answer
20 views

Is there a way to dump all registered sidebar/widget?

I need to know the properties of sidebar and widgets I've added, is there a way to dump those? Thanks.
0
votes
1answer
47 views

Customise search form in the Widget

I would like to customise the Search Form that you drag and drop from the widgets panel. The customisation will be more than just css changes. I would like to add and custom classes. Is this ...
0
votes
0answers
15 views

why ’ quote double quote in database wordpress

i'm trying backup and restore database using php code. but i don't know why quote double quote show in database wordpress, something like ’, and destroy my wiget_text. So how can i fix that.? help ...
0
votes
0answers
48 views

Widget Select Options not saving

I have a widget where there is a select dropdown, with a list of all the pages on the site. I am trying to get my code correct so that when a user chooses a page, after clicking Save in the widget, ...
1
vote
2answers
97 views

Display attachment, post and page in recent comments widget

The following code (old post is here and author is diggy) is useful, but i'd like display post and page on recent comments widget, not only attachments. function wpse80087_widget_comments_args( $args ...
0
votes
1answer
28 views

Add space to the end on a widget

I have a widget that when stacked with another the out put from my widget to the next sit on top of each other. I tried echo <br> but that gives me a fatal error. Is there any other code to add ...