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

learn more… | top users | synonyms (1)

0
votes
1answer
20 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
5 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
39 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
0answers
19 views

Automatically add widgets to all pages

I have created a few pages and made them into menus. Also i'm using widgets on pages. Some of the widgets should be in all pages. In every page i need to add a short-code to that widget. Is there any ...
0
votes
0answers
22 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
0answers
10 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
25 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 ) { ?> ...
-1
votes
0answers
26 views

Get an archive of a specific category

I have created a widget to get an archive with the post count. The issue is, I want to display the monthly archive of the specific category blog. Here is the code I've tried to display the ...
-2
votes
0answers
16 views

how can we make a widget which is visible on selected pages? [closed]

<?php /** * Twenty Fourteen functions and definitions * * Set up the theme and provides some helper functions, which are used in the * theme as custom template tags. Others are attached to ...
0
votes
0answers
20 views

Multiple Forms Email validation on a single page using javascript [closed]

I am developing a Wordpress Widget Plugin that inserts as many as you want email input forms in a widget. I am using the following code to validate email fields function validateForm(form) { var x ...
0
votes
2answers
25 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 ...
-2
votes
0answers
16 views

widgets and dropdown menus [closed]

hi like i said am not that good with word press so i will be asking a lot of questions in here. i just want my widgets to look like the picture i have placed there how do i do that is there a ...
0
votes
0answers
15 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
18 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
17 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
15 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
19 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
13 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
11 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 ...
-1
votes
0answers
21 views

Widget to add an different image to sidebar (by category)

I want to add custom content (maybe using a widget) on my website's sidebar that changes by category. For example, if a user lands on the 'Cars' category, I want to show an image related to cars. In ...
0
votes
0answers
14 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
36 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
30 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
14 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
37 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
14 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
24 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
11 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
18 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 ...
-1
votes
0answers
33 views

Adding datepicker field to my custom widget

I want to add a Datepicker field to my custom widget. So that I can select a date from backend. I have tried a lot but no proper solution. class ownplugins extends WP_widget { public function ...
0
votes
1answer
20 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
53 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
21 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
48 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
17 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
31 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
2 views

Accordion script fails after widget save process in admin [migrated]

I used the ddaccordion 2.0 script by Dynamic Drive to create an accordion function for a widget in admin area and some vexing issues are occurring as I cannot determine a solution. On initial ...
0
votes
0answers
11 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
44 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
64 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
25 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 ...
0
votes
1answer
19 views

How to show a widget for logged-in users only?

have a widget that I want to hide from visitors to the site. I know I need to use this code; if ( is_user_logged_in() ) { echo ''; } else { echo ''; } How do I use this in a widget? What ...
0
votes
1answer
37 views

Add sidebar in inner pages

I am new to wordpress coding. I want to add a sidebar to pages other than the home page, both pages are my custom templates. I want to list in admin so that admin can edit the content of sidebar. ...
0
votes
1answer
38 views

Shortcode in Text Widget not working

Not sure why this is not working. I get no errors, but just shows nothing at all in the text widget. The shortcode works on pages and posts. WordPress version 3.9.1 add_filter('widget_text', ...
0
votes
1answer
20 views

Can't output the number 0 in widget

I have an input box where a user can input a number and then that number will be outputted into an html page. It all works fine except when you enter in the number 0 it doesn't output anything but it ...
0
votes
2answers
28 views

Wordpress - registering sidebar and adding a button directly after .textwidget

I have registered a new widget area, code as below and want to add a button after the .textwidget, however cannot seem to do it properly. Adding it after the </li> results in the button not ...
1
vote
1answer
33 views

How to check if a widget has no title

I wanted so that my widget has the following structure: <div class="widget-area"> <h4 class="widget-title">Foo Bar</h4> <div class="widget-content">Blablablabla ...
0
votes
0answers
36 views

How to give dynamic url path in widget?

I have a widget and give link to some text within it like href="http://www.netattingo.com/dev/imc/" as it is static path in widget but when I try to to use "site_url" or "bloginfo". It does not work. ...
0
votes
0answers
26 views

Widget Areas Still Appearing in WP ADMIN When They Shouldn't

I had a bunch of "Widget Areas" registered for my theme. I removed a few and added a few. The ones which I removed, I deleted the code which is hooked on widgets_init for registering the sidebars. I ...
1
vote
1answer
34 views

I wrote my plugin. How to display the result of the plugin's function to sidebar (widget?)?

I wrote my plugin. How to display the result of the plugin's function to sidebar (widget?)? <? function register_form () { global $post; $test = "testesttest"; var_dump("testtest"); ...