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

learn more… | top users | synonyms (2)

1
vote
0answers
33 views

Widget Logic use with Custom Taxonomy

I am using Widget Logic and attempting to use the new WPAdverts plugin to display classified ads. They use a custom taxonomy of taxonomy=advert_category&post_type=advert. I'm trying to display a ...
1
vote
0answers
25 views

Adding a widget function into the php theme file

I am using the following plugin - widget No Cache AJAX Widgets to display on the sidebar a feed of rss news that is created dynamically and bypassing the cache function. In updating the site we wish ...
1
vote
0answers
10 views

Unable to edit the “customize” section and the “widget” section is populating unknown code

My WordPress site is experiencing some major issues. I am getting a 500 server error when attempting to change the "customize" side bar, and the "widget" section is acting really weird (populating ...
1
vote
0answers
11 views

Custom Widget form function common elements

I am writing a set of custom widgets, all of which share a common 18 lines of code in the form() function, which looks like this: <div class="common-section"> <input type="hidden" ...
1
vote
0answers
19 views

'Pages' widget alternative for custom post types?

I want to make a menu from hierarchical custom post type. There is a default WordPress widget called 'Pages' that give you list of all the pages preserving their hierarchy. Is the a way to use this ...
1
vote
1answer
73 views

How to add a class to Tag cloud widget link?

I am currently trying to add styles to the links in the Tag Cloud Widget which I can see uses wp_tag_cloud() to output the cloud itself. The args in wp_tag_cloud() don't include a classname which is ...
1
vote
0answers
23 views

How to exclude a widget from page 1 of a paginated post

I want certain widgets to not appear on page 1 of a paginated post but appear on all other pages (page 2,3..so on), and some other widgets to appear on only appear on page 1 and not the rest of the ...
1
vote
1answer
34 views

How to edit widget code to add unique class name to each div?

Code from existing widget: $get_featured_pages = new WP_Query( array( 'posts_per_page' => -1, 'post_type' => array( 'page' ), 'post__in' ...
1
vote
1answer
21 views

how to display a widget only on a page where the custom field is defined?

I have a set of local pages using a template, I want to display a widget only on pages where I have ticked the custom checkbox field.
1
vote
0answers
6 views

Choose sidebars column in widgets.php page

I know that sidebars appear on widgets.php page in order that you register the sidebars. So register_sidebar(array( 'name' => __('First', 'mytheme'), .... )); register_sidebar(array( ...
1
vote
0answers
20 views

Wysiwyg editor errors

Hi everybody I am having a prob with wordpress when in my themes and browse to widgets and they are not active and won't allow editing. This is a brand new WP install and even if I change my theme its ...
1
vote
1answer
19 views

How to make WordPress customizable for clients

I was wondering how I can make WordPress customizable for clients? Such as, I use classes and ids in my span, paragraph, div, (etc.) elements... so how do I do this customization without having the ...
1
vote
0answers
45 views

Admin Dashboard with Custom Tab for Client

I am trying to create a basic Tour Date widget. When the user clicks on the Tour Date Tab from the admin dashboard I want them to be presented with five fields. Date Venue City, State or Country ...
1
vote
0answers
34 views

Can't receive $args[ ] to my custom widget

I'm new to WordPress. I created my first ugly widget. It located in wp-content/plugins/my-awesome-widget/widget_init.php (no more files in this folder). And it's working. I created a sidebar and ...
1
vote
0answers
32 views

Get draggable widgets on Edit Post page

Is it possible to get the widgets with settings (just as widgets.php page) on the Edit post (like attached image) ? There i can define a custom sidebar in post meta. However how to get the list of ...
1
vote
0answers
179 views

How to refresh Theme Customizer after change color inside wpColorPicker?

I develop my custom widget with setting where I can set up custom color for the widget. I use this code to initialize wpColorPicker instead of default text input in form() method of Widget class: ...
1
vote
0answers
30 views

How to show all post related taxonomies

I created several custom taxonomies for default WP post type. Does anyone knows any widget solution or have any idea for this: How to show (in sidebar) all post related taxonomies? Example: If we go ...
1
vote
0answers
25 views

Rewrite woocommerce categories widget urls

I am attempting to rewrite the list of categories url in woocommerce categories widget printed to the page. Not sure if I am adding this to the correct hook, or where I went wrong. function ...
1
vote
0answers
8 views

Setup page on first login on multisite

Is it possible to create a setup page on the first login before they visit their admin page to say change the language of the administrator and change their temporary password? I don't want users to ...
1
vote
1answer
43 views

How can I inject options into an select tag inside the widget form?

I created a widget, that retrieves filenames from the database and am now trying to output the filenames as options in a select tag inside the admin widget menu(the form function in the widget class). ...
1
vote
1answer
70 views

Problem creating an array instance in a widget in 4.4 update

Before WordPress 4.4 recent update, I was able to create an array instance in a widget from a multiple select menu this way: <?php $cats = get_categories(); ?> <select multiple="multiple" ...
1
vote
1answer
47 views

Filter widget outputs

I've been trying to find a good solution for my problem, but I can't seem to find anything on this topic at all. I've got a custom sidebar, created by using register_sidebar and I've used wordpress's ...
1
vote
0answers
67 views

Select multiple categories from CPT to display in LayersWP builder widget

I am currently developing a LayersWP child theme and have registered a portfolio custom builder widget. In this widget I would like users to be able to select the categories that they want shown. For ...
1
vote
0answers
59 views

Theme Customizer - Choose where widget area appears, to let users organise widgets

I am creating a Theme, and I have a problem with Widgets and Widget Areas. I am using the Theme Customizer to let the user edit the content, colors, etc. I know how to create a widget area. I need to ...
1
vote
0answers
69 views

How do I pass the id of my widget to javascript in the form function?

I would like to add a Quilljs editor to the admin area of my widget, but I am having trouble passing $this->id to javascript. I am using the foo_example widget code, and I've appended the ...
1
vote
0answers
44 views

Can you target a widget_class in a register_sidebar?

Using Bootstrap 3 to create a WordPress theme I am using register_sidebar() for the sidebar: if ( function_exists( 'register_sidebar' ) ) { register_sidebar( array( 'name' => __( ...
1
vote
0answers
127 views

Widgets not displaying since 4.3

I had some basic widgets registered and assigned to sidebars which were working prior to upgrading to WordPress 4.3. class Footer_Contact_Widget extends WP_Widget { public function __construct() ...
1
vote
1answer
41 views

Widget - link to page rather than absolute url

When I add a link in a Widget, I get the standard Insert/edit link dialog with a Search field. If I enter the Page in the Search field and then link to this page using the "Or link to existing ...
1
vote
0answers
52 views

Post Count for Categories, however not to calculate a total

Normally this is how the category widget works. Fruits (15) - Apples (7) - Oranges (3) - Grapes (5) Apples, Oranges and Grapes contains posts, however nothing in Fruits. Lets assume that Fruits ...
1
vote
0answers
84 views

Fire on widgets_init only on dashboard

I have an interesting issue. I need to launch an action on widgets_init, but ONLY on the WordPress Dashboard. So I can't use dashboard related hooks, because they fire too late; it has to be on ...
1
vote
0answers
49 views

Custom widget with WYSIWYG

I am developing a Custom Widget and i want to add a textarea with WYSIWYG editor in my widget setting . Any idea or suggestions ?? Thanks.
1
vote
0answers
164 views

use add_action('wp_head') in a widget for generating dynamic CSS styles

I have been working on a 'Custom Pop Links' widget for use in a theme which is ready for distribution. User can change the color of a link using a color picker inside widget. Untill now, I used inline ...
1
vote
0answers
78 views

Limit number of widgets in widget area

I used code to limit each widgets area to one widget only. It works great: It uses JavaScript to do so, using the fact that the dashboard’s widgetized areas all use the jQuery UI Sortable library, and ...
1
vote
0answers
81 views

Access Customizer widget instance form

On the WordPress admin widgets page there is a known issue with the widget form not being available the first time a widget is added to a widget area. This can be seen in this trac ticket here: ...
1
vote
0answers
180 views

How to create pagination for homepage with widgetized area?

I have created homepage with sidebar area filled with different widgets. Each widget fetch and display posts from different categories. Now I need to create a numbered pagination in homepage which ...
1
vote
0answers
84 views

how to convert Html block to dynamic widget?

<div class="widget-wrapper"> <div class="widget-icon"> <i class="fa fa-facebook"></i> </div> <div class="widget-title"> </div> ...
1
vote
0answers
64 views

WP_Widget instance value to wp_head

I have some problem with dynamic variable on widgets. class instaslidewidget extends WP_Widget { public function __construct() { parent::__construct( "text_widget", ...
1
vote
1answer
118 views

Custom Tag Cloud widget missing tags

I was trying to create a custom tag cloud widget that will look like this: Also, when I tried including some new tags in my post then it's showing something like this (just one tag): This is my ...
1
vote
1answer
100 views

Wordpress: How to embed a widget on a separate website?

A client requested that we make a copy of their WordPress widgets onto a separate, non-WP site. Is there an easy way to "plug in" the widget? I imagine I would have to somehow source to something ...
1
vote
1answer
86 views

Displaying details of a post in a sidebar

I am developing a wordpress theme but m still new into and was learning. Basically, its a theme for resource website which provides web templates. In my theme i've created a details section in sidebar ...
1
vote
0answers
177 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 ...
1
vote
1answer
426 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.
1
vote
1answer
50 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
63 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 ...
1
vote
1answer
434 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 ...
1
vote
0answers
106 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() { ...
1
vote
2answers
230 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 ...
1
vote
1answer
191 views

Create variable from widget instance

Is it possible to return a widget instance into a variable or array? I'm thinking something along the lines of $widget['title'], $widget['content'] etc. I have tried inspecting the global ...
1
vote
0answers
89 views

Widget on the right side of the page overlaps with the left side

I added the mailchimp widget to the right column of my blog. But for some reason, it overlaps with the main content of the blog. Here is a screenshot of what happens Would anyone know why this ...
1
vote
1answer
442 views

How to add a text widget during theme activation

I'm trying to add a text widget with the title and text set, to two custom sidebars in my custom theme. But, I can't find a clear walkthrough of how to do it. I've seen bits of code here and there, ...