Tagged Questions

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

learn more… | top users | synonyms (1)

0
votes
1answer
15 views

Static image for embedded YouTube video instead of blank player?

Thanks to this answer I have embedded a YouTube video in a Text Widget using [video src="http://youtu.be/JQ_2De2cnzI&rel=0&showinfo=0"] However it displays as this blank player when the ...
0
votes
0answers
13 views

Allow end users to change settings of a widget

I currently have a customized widget installed. At this moment, I would like to allow end users, through the use of certain admin menu (other than appearance menu) to change the settings for this ...
-1
votes
0answers
8 views

Posts calendar widget highlight categories [on hold]

I need a posts calendar widget that highlights posts from different categories with different colors. 1 day = 1 post is a constraint.
0
votes
0answers
23 views

Top author widget

I want to create a widget of top author. That widget will show 10 authors in ASC, and a link to their author page. This will be shown because of the amount of views that every author have, and then ...
-1
votes
0answers
12 views

How to change the stylesheet of a widget

I am trying to change the color of the text in a plugin (a widget). How do I find, unregister, dequeue a plugins/widgets stylesheet and add my own?
0
votes
0answers
11 views

How to add more than one custom widget

I created a new widget using instructions found here and it worked OK. I needed to create another widget. I created it from the default Text Widget, placing the code in functions.php (as I did with ...
1
vote
1answer
44 views

How do I embed in a text widget?

I'm trying to embed a YouTube video in a Text Widget and Wordpress 4.0 is stripping out the embed when rendering. For example, if I put this in the body of the widget: Before ...
3
votes
1answer
53 views

How to update widget from widget() function?

I'm trying to create a simple linkroll widget for displaying recent https://pinboard.in links via their API. To maximize loading speed, I want to cache the linklist in a widget field, as well as the ...
0
votes
1answer
40 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
20 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
20 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
36 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
29 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
61 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
24 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
20 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
68 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
20 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
15 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
17 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
47 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
42 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
33 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
11 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
27 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
11 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
16 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
50 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
55 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
40 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
21 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
28 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
16 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
27 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. ...