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

learn more… | top users | synonyms (1)

0
votes
1answer
5 views

how to 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
7 views

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

I 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 ...
-2
votes
0answers
13 views

Add link with title to a widget

I Have a widget that I need to add a link for the users. I want a title for the link to show ( Friend ) and be able to attach a link to it. The rest of the widget works except i cant figure out how to ...
0
votes
1answer
232 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
1answer
18 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
25 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 ...
1
vote
1answer
28 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"); ...
0
votes
2answers
16 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
27 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
11 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. ...
2
votes
6answers
6k views

Including Custom Post Types in “Recent Posts” Widget

I'm able to easily include my custom post types into my main loop by making small adjustments with query_posts(), but I'm not sure how I would go about including custom post types in the "Recent ...
0
votes
0answers
20 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 ...
-4
votes
0answers
24 views

How can I add a jquery to my website [closed]

How can I add a jquery widget to my website so my website will show a link I need to add? Thank you Richard
0
votes
1answer
245 views

Using add_filter() in Widgets

Just have a query reference the add_filter() function. Can you use this function inside a WordPress widget class. Example I have a widget with dynamic created code that I want to pass to another ...
2
votes
1answer
52 views

Programmatically edit the text of a widget

I have text widgets that contain text. I'd like to programmatically edit that text. Is there a way to do that?
-1
votes
0answers
13 views

How to make custom menu widget to have dropdwon function?

How to make custom menu widget to have dropdown function? I am to avoid put into sidebar, because I had long product category list and I would like to put custom menu widget (with dropdown) before ...
0
votes
2answers
16 views

Unregistering a Sidebar in Child Theme

I'm working with a handy responsive theme framework (Reverie) and I'm developing my own theme the right way using a Child theme. The Parent theme calls a sidebar called with an ID of 'Footer' and ...
0
votes
1answer
405 views

How to “pair” two widgets side by side in one sidebar

Currently I use the Pinboard theme with 2 sidebars. In each sidebar I place one kind of widget several times. The point is that 2 widgets of a row (1 of each sidebar) belong together regarding the ...
0
votes
2answers
1k views

Creating a custom menu/widget area

I'm looking to create a /menu/widget area like the following site: http://www.microsoft.com/en-gb/default.aspx please see sections under downloads, security, support, about is this considered a ...
0
votes
0answers
58 views

Dynamic css for a widget plugin

I have a plugin that creates a widget to show latest posts and I would like to add a dynamic css file to style the post title without using inline styles. So for example i have public function ...
0
votes
1answer
19 views

Widget dropdown always displays first option

I have a custom widget that I have made but whenever I change the dropdown value it always reverts to the first option when I save the widget. How can I have it display whatever option the user ...
0
votes
1answer
22 views

New Widget are not showing

I added a new sidebar according to WordPress Codex and for some reason it shows only on the admin and nothing shows on my front pages.. I tried to look for it on Google and here on the forums but I ...
0
votes
1answer
243 views

Decrease white space between sidebar widget title and graphic

I am new to all of this, so sorry if this has been discussed. I am looking for a way to decrease the white space between my sidebar widgets, especially between the titles and then the pic. ie. "my ...
0
votes
0answers
19 views

Wanted to collapse all the widgets in sidebar by default via jQuery

I already applied jQuery on footer to Slide them up but i noticed that when the page is completely loaded the widget slides up properly but dont know how this again slides down automatically. I m not ...
0
votes
1answer
32 views

Wordpress Footer Widget Processing

I made a sidebar in wordpress and have widgets in it, I want to process them one by one so that I can set their locations in theme according to me. Example: If I have a 3 widget in my footer ...
1
vote
2answers
253 views

Add description to custom text widget and display the 5 recent post titles

I just started coding and working as an intern for a company. My boss asked me to create a custom text widget for practice in making word press widgets. The problem I am running into is I have no idea ...
0
votes
1answer
17 views

Dynamic Width of Widgets

Ok, I'm using the following code for up to 6 widgets in a sidebar function s57d_sidebar1_params($params) { $sidebar_id = $params[0]['id']; if ( $sidebar_id == 'sidebar-1' ) { $total_widgets = ...
0
votes
0answers
13 views

Prevent submission of widget form

How can I prevent submission of a widget form? The following doesn't work for me. And preventing submit won't work because Wordpress uses Ajax for those forms. jQuery(document).ready(function($) { ...
1
vote
2answers
2k views

Including a custom post type in the Archives widget

I have a custom post type called "videos" that I want to include in the Archives widget (stock widget in the TwentyTwelve theme). It DOES already appear on the archives page, but just not in the ...
4
votes
1answer
878 views

Adding Widget form fields dynamically

I am trying to add form field to a WordPress widget dynamically. So if the user want to add another date to an event they can click a button to get more fields. The question is: How do save newly ...
2
votes
3answers
291 views

How do I save data from submitted form from widget

I'm looking over internet for some simple solution of email subscription widget but no luck. Or they are too complicated and paid, or they are relaying on some external email functions. I'm not a ...
0
votes
1answer
32 views

WP_query returns error when used for custom widget

I was working on creating my first plugin/widget that should display a really simple loop containing only a custom field (image) I've been testing the loop without any problems in my theme but when I ...
0
votes
0answers
15 views

Display custom menu on specific post/page

I have a real problem with Wordpress. My need is this: I have three main pages that every one must display a list of sub-pages (custom menu) and a list of events related to that specific page. Both ...
0
votes
0answers
33 views

Hide widget on page

How can I hide a widget from a certain page (one page). After spending an hour, all I can find is with the plugins. The problem is, that I know with them how to do it, but one widget (ad widget) is ...
0
votes
1answer
15 views

Get Widget Instance inside Widget

I'm trying to access the $instance variable from a custom function I've written inside my Widget, but I keep getting a "variable is undefined" error. How can I re-create the $instance variable? ...
0
votes
0answers
27 views

Infinite scroll on sidebar widget

I am trying to add an infinite scroll functionality to a website i am building, but i want to add it to a sidebar widget. I have a widget that shows a list of recent posts, and i would like to add an ...
0
votes
1answer
17 views

How to filter the widgets like calendar and archives based on category in WordPress

Thanks for the reply now the news page and blog page of my website has sidebars to specific to those, but now the new problem raised on the widgets side. Specifically Calendar and Archive widget are ...
0
votes
0answers
7 views

Jetpack infinite scroll on widget

I would like to add the jetpack infinite scroll (other options would be good as well), to a sidebar widget that shows "additional posts". So instead of paginating (ajax) the whole page, i only want to ...
0
votes
0answers
60 views

Custom Meta Boxes repeatable field show on single.php

I have some code that adds a Metabox, with repeatable fields to the edit screen of the WordPress backend. It looks like this: The code, I have in the functions.php, looks like this: function ...
0
votes
1answer
24 views

Changes in widget customizer not triggering 'save and publish'

I'm making some of our widgets customiser friendly, so they work on the customise page and support widget previews. Usually when you update a widget the save button becomes usable and changes to 'save ...
0
votes
1answer
18 views

adding image in the header of my dev widget

i want to add an image to the header of my widget in a div tag like so: <div class="header" align="center"> <a href="http://www.link.com"><img name="Header" ...
0
votes
1answer
43 views

Theme's default styles are overriding my plugin's custom CSS

I have created a little plugin that creates a widget that I've made, basically just a pretty <ul> element. Unfortunately, all default widget styles are overriding my custom CSS, and adding ...
1
vote
2answers
500 views

Conditional tag in Widget Logic for checking if top level page or if subpage

I'm using the Widget Logic plugin to show widgets on certain pages using Wordpress Conditional Tags (or any general PHP code). What I would like to do is only show a widget on child pages, not top ...
2
votes
2answers
426 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( ...
5
votes
1answer
8k views

Translate widget titles using qTranslate plugin

I'm actually using the qTranslate plugin to translate my website. It works really well with everything except one thing. the titles of my sidebar widgets. Actually, to translate some words we need to ...
1
vote
1answer
282 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
2answers
369 views

Unable to load “wpColorPicker” on theme customize page

Whether I'm using a Wordpress default theme or a custom one, I see the JS error: Uncaught TypeError: Object [object Object] has no method 'wpColorPicker' when I click "Customize" on the theme. I've ...
0
votes
0answers
13 views

How to include WP_Widget from another file in main plugin file?

I tried to use the code bellow in my main file: define( 'MYPLUGINNAME_PATH', plugin_dir_path(__FILE__) ); include MYPLUGINNAME_PATH . 'class/class-widget.php'; Then I have a file ...
0
votes
1answer
722 views

How to have Multiple Archives Widgets, one archive widget per category (in a different page)?

Please read the whole question before assuming this question is repeated. After one day of trying plugins and tutorials, I am convinced that there is no straightforward method of achieving what I am ...