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

learn more… | top users | synonyms (2)

0
votes
2answers
33 views

'is_author()' logic in widget for author only

So, I have a widget that I only want to show it to the page author. I used the following logic: is_author() However it does not seem to work (it shows non-author) Am I using this logic right? Any ...
0
votes
0answers
18 views

How can I build a widget area widget using the built in Wordpress functionalities?

My Home has a Main Area that consists of all sorts of widgets. Now I am looking for a solution where I can add a custom widget area as a widget and then add all the needed widgets inside that custom ...
0
votes
1answer
31 views

All Posts Have The Same Comments

I'm getting a really weird bug. I'm getting the same comments from 1 specific post which is the "Hello world" for every single post! But when I remove a bit of code for a recent posts widget that I'm ...
0
votes
0answers
16 views

twitter widget loads properly in all themes except my own theme?

I've written my own theme for my wordpress website. The problem is that the twitter widget loads properly in all the themes except mine. Below is the attachment of the widget in both the themes - ...
0
votes
1answer
81 views

WP_Widget dynamic field array with external AJAX

Im creating Wordpress widget, where I have to add parts of code dynamically by JQUERY.ajax() a JQUERY.append() to the widget form. I need it, to be able to save it by function update(). I have PHP ...
0
votes
1answer
20 views

Detect each active instance of a widget

Is it possible to detect each active instance of a particular widget? As part of a plugin I'm working on, I want to run a for each loop on each widget instance Each widget is a Twitter feed and the ...
0
votes
0answers
26 views

Unique widget id to target specific part of widget

I am currently trying to target widget part after title and collapse it on smaller screen where title would be a toggle. This is in my footer area and there are 3-4 widgets that I want to collapse on ...
8
votes
3answers
171 views

Plugin upgrading: Widget settings

I have tried doing some research on this but haven't found anything solid yet. I have a plugin I am working on and between the last version and the new version we made some updates to the widget that ...
0
votes
1answer
78 views

wp_nav_walker that interacts with widgets to setup mega menu

I'm a newbie WordPress developer working on a WordPress theme project that demands mega menus as part of the main navigation. I'm done with the front-end stuff, and now I'm trying to explore the ...
0
votes
0answers
22 views

Widget configuration inside theme

I need to change my theme on the fly (for mobile version I have a different appearance), but widgets are not saving correctly. I tried to configure widgets from the theme, but this method doesn't ...
0
votes
2answers
64 views

how to display custom widget anywhere in wordpress

i've a custom widget for ads,it helps me to show ads on sidebar but i'm trying to display it under every single post or on front page near to slider. <?php the_widget( 'AdWidget_300' ); ?> ...
0
votes
0answers
24 views

Custom widget not saving values

Hello I am very new to Wordpress development , I am trying to implement custom widgets for a theme. the problem is whenever I try to save my widgets settings it will automatically revert back to it's ...
0
votes
1answer
50 views

Custom post types archive

I'm developing my first custom theme from scratch (using Roots as base framework). The theme has 2 CPT, one for events and one for associations with a correlation one to many between the two (an ...
1
vote
1answer
30 views

Creating a one click demo importer

edit: I've re-written this because it is unclear, apologies it was written rushed on a Friday afternoon. Wordpress has import/export functionality for posts within wordpress, I am a theme developer ...
0
votes
1answer
22 views

How to remove a widget from the sidebar on specific page?

I want to remove a widget from page with id '28'. How can I do it? I have found function for it, but it is private function, so I can't use it. "wp set sidebars widgets This function's access is ...
0
votes
0answers
135 views

Embed google alerts rss feed into WordPress site

adjustment on my origonal question. How would I go about adding a new widget area to my current template so I can embed a google alerts rss feed? Cheers for any suggestions / solutions
0
votes
1answer
60 views

Change Widget that display posts from categories to tags

I have a theme with a widget that display posts from category and I wanna change it to posts from tags if it s possible. Here is the code : // NewsInPictures Widget class NewsInPictures extends ...
-1
votes
1answer
21 views

How to hide sidebar widgets in all pages except Hompage?

im using a sidebar widget in homepage for an extra gallery. sadly it appears in every pages ._. thanks in advance
0
votes
0answers
42 views

Add text editor to custom widget

I am aware of a few plugins that simply add a rich text widget, but I want to make a widget that will wrap the whole input in a class to be used in the page editor plugin. I just want to add a ...
0
votes
1answer
89 views

Widgets Section not displaying in theme customizer

When in the WP Theme Customizer, my widget management section isn't displaying (i.e. I can't add/change/remove widgets). I CAN, however, add widgets from the Appearance -> Widgets section, just not in ...
0
votes
2answers
41 views

How to create another widgets.php page

Is it possible to create another widgets.php page? say widgets-ads.php? I want to make it for displaying ads in my website by drag and drop of widgets in a predefined sidebars.
0
votes
1answer
32 views

wp_query in form method of widget breaks customizer

In the "form" method of one of my widgets I make a query to offer the user some posts to choose from, like this: <?php $products = new WP_Query( array( 'post_type' => ...
0
votes
0answers
27 views

My widget it showing up only its title, not content after adding the widget without saving

I made a simple Recent Posts widget that not showing up its content if I don't click the save changes after adding the widget. I notice this similar issue on some WordPress core widgets too. What can ...
0
votes
0answers
57 views

How To Make Wp Dynamic Sidebar Like twentytwelve Theme

im new in wordpress and trying to create wordpess theme which can be used in any wordpress blog ,im following twentytwelve Theme as my theme example but when i try to create sidebar it does not work ...
2
votes
1answer
33 views

how can i limit the number of instances for my widget

I am developing a generic widget that randomly selects an image to be displayed. I only have 5 images to choose from. Is there any way to limit the number of widgets to 5, so that there are no repeat ...
0
votes
1answer
19 views

Expanding a function to call a plugin or show a link

I have added the following code to my functions.php to validate if a user is logged in before allowing them to fill out a form: function my_members_only_shortcode($atts, $content = null) { if ...
0
votes
1answer
31 views

How to programmatically GET (to know) which Sidebar (or) which Menu is being used on Different Pages?

Lets say i want to detect such thing from the "functions.php" .. to know which Sidebar (or) which Menu is being loaded on current (whatever landed) page, how can i know? Lets say i have a few pages, ...
0
votes
1answer
34 views

Why isn't this widget displaying one of the icons?

I have coded a widget. In the admin area the user can enter the url for their youtube, facebook, twitter and google+. On the front end of the site in the browser, they can click on a logo for either ...
0
votes
1answer
37 views

How to detect if query is runned from widget?

I want to know if exists function that detect if some database query run from widget, for example from recent_posts widget or search_widget.
0
votes
0answers
90 views

Creating custom search results widget

I am new to wordpress and trying to accomplish the following: I want to create a wordpress widget with the following functionality. Please advice how it can be accomplished: Widget should accept ...
0
votes
0answers
12 views

Converting hashtags into search friendly term (%23) in a widget

The plugin Hashtag can achieve this within a posts text, so surely its possible on a widget? I have no idea what I'm doing here, specifically its the widget 'Popular searches tag cloud' I am trying ...
0
votes
0answers
24 views

Enhance built-in calendar widget to dynamically browse through months

I am using the built-in calendar widget to show posts, the plugin "Future" helps me to show future posts too and so far everything works fine. But when you click on the arrows for the previous or ...
0
votes
1answer
75 views

Extending the WP_Widget_Text class

I am trying to alter the output of the default WordPress text widget. Since the widget is written in OOP I hoped it could be a simple deal of extending the class and overwriting one method – but it ...
1
vote
0answers
89 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 ...
0
votes
2answers
97 views

Widgets won't save

I have almost no experience in creating widget area's and I am stuck at saving the widgets in the widget area 'red menu'. I have searched a dozen posts but I can't seem to get it working. I am ...
0
votes
0answers
22 views

Wordpress Custom Widget Strange Behaviour

I have developed a Custom widget plugin with a dozen of input fields. Some of those input fields load Fabtastic Color Picker. When I add the widget in any widget area, the color picker loads very ...
0
votes
1answer
176 views

Custom widget doesn't save values from dropdown box

I am trying to save the value from a dropdown box on a custom widget created by me. the title from the same widget is getting saved, but not the values from drop down box. Can someone please help me? ...
0
votes
0answers
10 views

Sidebar Categories Questio

I added five categories through widgets on my primary sidebar. Under each of them, all of my main categories that have posts in them are coming up. However, I only want certain categories to come up ...
0
votes
0answers
8 views

Widget is breaking on filter function

I have created a widget which displays posts based on Display Posts shortcode. All works fine till I have added filter to public function widget() to output titles only (and need to be executed only ...
1
vote
1answer
133 views

instance is empty in function widget()

I am working on a widget for my theme. If I do a print_r($insance) in the form function, the instance array is populated with the correct data. I have checked the database and the correct ...
0
votes
2answers
79 views

Show different website layout if no sidebar added

I have a question about website layout with and without wp widges in sidebar. Here is the code i have for my registered sidebar. <?php if ( !function_exists('dynamic_sidebar') || ...
0
votes
1answer
60 views

How to Sync Menu, Widgets and other masters from Main Website to its Sub Site

I am using Wordpress Multisite Network and i am having problems regarding masters to its subsite. I am not able to see the widgets or Menus which were created on Main website to its Sub-site. When i ...
1
vote
1answer
243 views

Embedded Videos (PB) - Not Available

I am using this link to create a wordpress website VIDEO At minute 53 the guy is using "Embedded Videos (PB)" widget in order to embedd a youtube video. (By the way he is using Page Builder). Problem ...
0
votes
1answer
21 views

Target logic based on Widget / Sidebar Name

I have a theme that uses registers a sidebar called 'homepage-middle-widget' and it's child widgets are pulling images in undesired sizes. Is it possible to target a widget and / or it's parent in ...
0
votes
1answer
39 views

Hide first blog post in content and output it in widget

I am working on a theme and want to hide the first blog post and instead output it at a custom widget position. For that I created a variable in the functions.php called $postCounter. I accessed ...
0
votes
3answers
74 views

How to add css classes to widgets?

I need to add a class to the WordPress search widget. How would I go about doing so? I'm calling it from the admin side, as in dragging and dropping it into the sidebar at the widgets page of the ...
0
votes
2answers
54 views

Dynamically add content to an existing widget area

I have an existing widget area / sidebar. Rather than adding content to it via Appearance ? Widgets in the Dashboard, I want to inject content into the widget area from functions.php. Is there hook ...
0
votes
0answers
32 views

“widget” on edit.php which loads/saves data

i am trying to add a "widget" to the edit.php post-filter-table as seen in this plugin: https://wordpress.org/plugins/advanced-post-manager/screenshots/ i would love to do this with piklist or ...
0
votes
1answer
28 views

modifying title (in dashboard) for different widget instances

When I insert multiple instances of widget in a particular sidebar, they all appear by default collapsed and with the same title. E.g.: In this case, the user can upload a different pic to each ...
0
votes
0answers
16 views

Any reason why widgets/menus get emptied when I updated custom theme code?

Deployed my site over git last nite, and client came back saying some menus in the the footer widgets had disappeared. I looked in the admin, and the widgets were still available but all the items ...