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

learn more… | top users | synonyms (1)

0
votes
1answer
28 views

display specific widget to a page

im trying to display a specific widget i need for the header current im using a code to display all widgets but my problem is that if I add additional widgets it will destroy my site. ...
0
votes
0answers
16 views

Dynamically creating classes for Widget API

So let's say I want to make new Classes for the Widgets API using some variables that the user can configure. The only way I have figured it out is to use the eval() function. This is due to how ...
0
votes
0answers
11 views

Show value based on dropdown [duplicate]

I am trying to create a short code with a form I have the form displaying ok but I need to be able to pull the price information from sql table as well and show it in a label. How can i do that using ...
0
votes
0answers
12 views

Widget not working with Data [duplicate]

I have tried the following code given to me by another question here but for some reason in my widget its just dispalying the word liters in the drop down its not puliing data when i look at the code ...
0
votes
2answers
19 views

How to get post ID of the current page/post inside a widget?

I'm trying hard to get the post ID of the current post/page inside a widget class but doesn't work, I know there's get_the_ID() and some other options but not a single works inside a widget. Here's my ...
0
votes
1answer
35 views

How can I retrieve data within my widget

I have a Widget which I am creating but my quesiton is how do I access my custom table which I created via my plugin. I am attempting to fill the dropdown from the table called tfp which contains the ...
0
votes
0answers
15 views

Run widget code before post content

I have a customized widget that allows the user to create a quick post on the front page sidebar. The code processing appears to happen after the post content is rendering, meaning that after i submit ...
-1
votes
2answers
23 views

How do I include the sidebar (with Widgets) in a custom theme?

I have created a custom WordPress theme and need to be able to include the sidebar with widgets. I have the sidebar.php file, functions code and three widgets waiting to see the light of day. But ...
3
votes
1answer
57 views

Ask user permission when activating a plugin

Is there a specific Wordpress API way to ask the user's permission for something when activating a plugin? Due to the Wordpress plugin directory policy I have to ask the users consent for the ...
0
votes
0answers
22 views

Custom php Widget keeps disappearing from the front end

I've created a widget to show custom testimonials on the sidebar. It checks if the post has a custom field 'customer_review' then prints a it on the sidebar. Thing is, the testimonial keeps ...
0
votes
0answers
17 views

Widget area to full width layout only

I want to add a new widget area that will only display if the layout is full page (no sidebars). There doesn't seem to be a WordPress conditional based on layout. Is there a way to do this?
0
votes
1answer
64 views

Using a multiple <select> element in widget form

I am trying to save all of the options in a <select> element in a widget. So far I have the following PHP code for the form: public function form( $instance ) { // Code for editing/adding ...
0
votes
1answer
18 views

Why isn't my custom widget outputting any content?

I've been following numerous tutorials and codex pages in order to make my own widget in WP 4.0. It seems as though I'm very near; I can output something from the widget, just not any of the fields. ...
0
votes
0answers
12 views

Group multiple widgets in one

Is that possible to group some widget into one. I am creating some similar widgets and I want to group them altogether. Like I want to name it "Widget Group" and when I activate "Widget Group" plugin, ...
0
votes
0answers
16 views

“Add post form” inside a custom admin widget?

I have created a custom post type (support ticket) and a custom user role (client). So, I want to create a widget that allows a client to add a new ticket (which contains only 3 custom text fields). ...
0
votes
2answers
46 views

Add content to footer - above wp_footer

I know there are several questions about the footer, but I did not find answer to this. If this has been asked before, my apologies. I am developing a widget plugin and I wanted to give users the ...
1
vote
2answers
41 views

Display assigned terms with link

I want to display product assigned terms, wrapped in link/anchor MarkUp, in my sidebar on a page as a widget. I am not getting the correct tag URL. Code returns visited product URL instead of listed ...
0
votes
1answer
17 views

Get widget locations in WordPress plugin

I'm writing a plugin and i am searching for a function (preferably a WP function) that returns all sidebar id's that have my widget in them. For example : i placed my widget in sidebar1 and sidebar2, ...
0
votes
0answers
27 views

Populating a list of IDs for a widget to use in WordPress

I am trying to create a widget that takes a list of user-given IDs for items and then displays them at random wherever the Widget is placed. So far I have the following set up: User enters an ID in ...
0
votes
1answer
32 views

Escape HTML on WP input

I am slightly stuck on creating a widget, it has an input (bit like the default text widget) but got an issue adding html into it. My code is: $instance['content'] = ( ! empty( ...
0
votes
1answer
30 views

How to add wp visual editor in a custom widget?

I am developing a widget plugin and want to add a textarea with WYSIWYG editor in widget settings. Any help would be highly appreciated. Thanks.
0
votes
0answers
10 views

How to format the Widget Display function contents?

I'm writing my first plugin, and basically I'm wondering how to write the code which goes inside of the widget display function: function widget($args, $instance) {} I'm trying to run a post query, ...
0
votes
1answer
24 views

multiple custom post type category selection search

I hope it's clear from the title but let me try to explain it better. Looking at this image should make it clear: I have custom post type names Product and categories related to it. What I am ...
0
votes
1answer
20 views

How to Activate WordPress Widgets

I have created some widgets for my WordPress site. I use fallback data widget WordPress which I got form this free WordPress theme: https://wordpress.org/themes/brightpage. So, if I don't put any ...
0
votes
1answer
10 views

How to Make widget area on place of comment

I want to make a widget First I registered widget area in functions.php register_widget(array( 'name' => 'widget', 'description' => 'Sidebar below single post', 'before_widget' ...
0
votes
0answers
15 views

I'd like to move the Widgets Panel to the bottom of the list in Customizer

I'd prefer to have the 'new' Widgets Section/Panel (that extends to the widget areas) drop down to the bottom of list in Customizer. I've tried: $wp_customize->get_panel('widgets')->priority = ...
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
25 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
15 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
46 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
53 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
39 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
19 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
26 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
49 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
18 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
11 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
27 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
13 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
26 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
31 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
53 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
72 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
35 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
34 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
34 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 ...