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

learn more… | top users | synonyms (2)

0
votes
0answers
28 views

How to add a dynamic image as a widget in dashboard

I'm trying to add an image as a widget on the dashboard screen like this: This is an ads image, which will be seen only by users with read role and that too will be changed every month. Already I ...
0
votes
1answer
68 views

Check if the current shortcode is being used in a widget

How can I check if the current shortcode is being used in a widget? I need to disable some shortcode options that are not allowed in a widget. Someone know how?
0
votes
0answers
73 views

Widget Text - how to get the content with the_widget function?

I added some text with a title called 'Follow Me' in my WP text widget and I want to get this text by using WP code, so I following this guide: the_widget( 'WP_Widget_Text' ); But nothing is being ...
-2
votes
1answer
21 views

Keeping shortcode-generated widget and theme element in one line [closed]

I set up a playground site PlaygroundSite and I am trying to put Polylang language changer widget in the same line as linked-in icon. Because ascent theme does not contain a widget/sidebar area ...
0
votes
1answer
42 views

Widget to embed youtube video

I am new to WordPress development. Currently I am trying to make an widget to embed video from youtube. My plan is an admin or an author will just give the video id and the video will be in widget ...
0
votes
1answer
21 views

retrieve custom post image through widget

My custom post has featured image. I need to retrieve it through widget. I am using get_the_post_thumbnail. But it is not working. Except this the rest of the widget is working fine. Here is the ...
0
votes
0answers
16 views

Widget form is not saving value that retrieved based on taxonomy terms

Custom Post Type: employee Taxonomy: department Here is the code:for widget form function form( $instance ) { // Output admin widget options form if ( post_type_exists( 'employee' ) ...
1
vote
0answers
17 views

Add visual editor style only on widgets.php page

I'm attempting to add a visual editor style with the function add_editor_style('visual-editor.css');, but only on the widgets admin' page, and not on post editor screens. I'm using a visual editor ...
0
votes
0answers
16 views

Check over a small apply button widget I have made for WP Job Manager

I have made a small widget that displays the apply button in the page sidebar. I am still quite new to WordPress widget development and am wondering if somebody would be kind enough to have a look ...
0
votes
0answers
21 views

taxonomy terms are not retrieving

My custom post is "employee" Its taxonomy is "department" I made a widget for showing taxonomy terms. but it is not working. What did I miss? class Employee extends WP_Widget { function ...
0
votes
1answer
46 views

How to add first and last CSS class for Woocommerce layered nav widgets

I need to add first and last ccs class for woocommerce_layered_nav widgets. // Add "first" and "last" CSS classes to woocommerce_layered_nav widgets function widget_layered_nav_first_last_classes( ...
0
votes
1answer
90 views

How to get post category list as select in front-end?

I use widget plugin Getting the random post & URL via ajax. I want to add function, that allows users on frontend choose category, and than display random posts from this category. function ...
1
vote
1answer
274 views

Widgets not working in Customizr but working in Appearance

I'm having some trouble with my widgets. I've registered widget areas correctly; as the widgets are showing up in the "Appearance" menu. However widgets aren't showing up in the Customizr section of ...
2
votes
0answers
45 views

iris color picker in widget - click event doesn't fire when initially when widget is first created

I added the wordpress(iris) color picker to a widget, and the color picker is not clickable when the widget is first created. My guess is that it's where/how the javascript file is being enqueued, but ...
1
vote
1answer
50 views

Sidebar not show customizer!

It's showing widgets.php: Not showing customizer: sidebar.php function footer_sidebar() { register_sidebar( array( 'name' => __( 'Footer Sidebar 1', 'footer1' ), ...
2
votes
1answer
62 views

How can I reuse the Wordpress search form for a custom plugin / widget?

I need to develop a custom widget to display posts, based on their ID. The user must be able to handpick posts. Right now, they can enter the post ID, but it is not convenient for them. Is it ...
0
votes
1answer
113 views

Multiple rows of footer widget areas

I have a function on my functions.php that adds a bootstrap col class to the footer sidebars depending on the number of active sidebars. What I intend to achieve with this is having footer widgets ...
0
votes
0answers
39 views

How to hide default sidebar widgets?

I'd like to hide/not display all default widgets(Search, Recent Posts, Recent Comments, Archive, Categories and Meta) which are inserted into custom sidebar when the theme is installed. (Removing them ...
1
vote
1answer
21 views

Create an extra Widget Areas in WordPress TwentyTwelve

I'm new to wordpress and it's difficult for me to find some basic information in forums and documentation. I'm trying to create my own widget areas, and place my widgets there in administration ...
1
vote
0answers
37 views

Input in plugin widget does not allow spaces

I'm developing a plugin for a client which allows keeping records of reservations to their hotel, and it has a widget which allows clients to make reservations. However, for some reason one of the ...
1
vote
2answers
24 views

How to conditionally display widgetized areas in theme customizer?

On my client's site there will be quite a few widgetised areas - one for each page created plus global ones. The problem is that they all display in the "widgets" section in theme customizer at the ...
-4
votes
2answers
34 views

Content expands beyond its column container [closed]

everyone! I was wondering if anyone would be able to tell me how the content in my center column is able to expand its allowed container size and push my right column/widget area to the bottom? ...
0
votes
1answer
139 views

How to add WooCommerce Add to Cart button in widget?

How can I add a separate WooCommerce widget, with the Add to Cart button and its options, so I can display it anywhere in the sidebar of the product details page?
1
vote
0answers
34 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 ...
0
votes
2answers
77 views

Where to add a widget class?

Where do we add our custom widget? I keep on getting internal errors, I tried to add the class in wp_content > plugins, or wp_includes > widgets, but I get an internal error. The class is simple, ...
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 ...
2
votes
2answers
93 views

WP available widget for certain area

After searching under the tag widget and Google the closest I have found that populates what I am looking for is this article: Is there a way to allow only certain type of widgets in the sidebars? I ...
0
votes
0answers
13 views

Widget that allows image selection

I'm trying to develop a widget that allows the user to select an image to display on said widget. Right now, i'm getting the image from the library and displaying it's thumbnail on the widget's ...
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
1answer
26 views

Custom Widget options in theme

I want to reprogram my first sketch of our theatre club page in wordpress but until now I only have basic knowledge of creating wp pages. As I want the theme to be as customizable as possible I want ...
1
vote
2answers
106 views

How to run PHP code in Text Widget with no plugin in WP 4.4

Before I had the following code in the function.php add_filter('widget_text','execute_php',100); function execute_php($html){ if(strpos($html,"<"."?php")!==false){ ob_start(); ...
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
28 views

add_page_menu to make shortcut to widgets

I want to make a menu button that takes me to wp-admin/widgets.php. The above code seems to work only partially. add_action( 'admin_menu', 'register_widgets_menu_button' ); function ...
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.
2
votes
1answer
16 views

Updating Widget options in custom install.php

I am using a custom install.php in /wp-content/ to over-ride some defaults when creating sites in a multi-site install. For the most part, this is easy and working really well. I am having difficulty ...
2
votes
1answer
19 views

Including Custom Post Type posts in a page template contextually (or should I widget?)

Please see the attached mockup… Each element in the sidebar (e.g., Communications) will probably have to be a Page. I'm aiming for maximum flexibility. I am using Epik (a Genesis child theme). I ...
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( ...
0
votes
0answers
30 views

Can anyone explain this Widget output code?

I'm trying to read and understand a widget from a Wp theme. This widget basically allows the user to display up to 3 featured pages with their corresponding featured images or thumbnails. I ...
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 ...
0
votes
0answers
11 views

I am getting widget deprecated constructor on wordpress? [duplicate]

I am using Widget Context plugins and on my wordpress widget deprecated constructor error are showing : widget_context has a deprecated constructor in ...
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
1answer
33 views

How to change plugin`s template (view) correctly?

I'm new to WordPress. So, I have installed a plugin to display recent posts (that's it: https://wordpress.org/plugins/flexible-posts-widget/). This plugin have a widget. And now I want to change ...
0
votes
0answers
8 views

Wordpress plugin(widget) development error logs [duplicate]

I am trying to development a wordpress widget, but for most time it's really hard for me to debug. Are there any way in wordpress plugin development that I can print something in a error_log file?
1
vote
1answer
113 views

Modify recent post sidebar to show post thumbs with out plugins

Hi i'm using undersocres to create a theme. I need to add post thumbnails to the recent post widget, but I'm stuck. I try the code below, but I get a duplicated recent post widget, one without ...