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

learn more… | top users | synonyms (2)

-1
votes
0answers
13 views

Wordpress Custom Rewrite Rule domain change [on hold]

Give me custom rule... domain/healthcare/file.html to domain2/healthcare/file.html
-1
votes
0answers
9 views

Custom rewrite rule for different domain [on hold]

sir, When user enter below url domain/200904/market43.shtml I want redirect to other domain... domain2/200904/market43.shtml sorry for my English... Please help me..... regards, raj
0
votes
1answer
278 views

Saving widget gets an undefined variable

I am developing a widget for cached feeds. The widget itself works exactly as I want but I noticed that if I were to delete the widget and then add a new one (or simply just add a new one) on the ...
1
vote
1answer
39 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
36 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
26 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
374 views

Using add_filter() in Widgets

Just have a query reference the add_filter() function. Can you use this function inside a WordPress widget class. Example I have a widget with dynamic created code that I want to pass to another ...
0
votes
0answers
30 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
30 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
1answer
12 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
3answers
33 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
28 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
2answers
2k views

Creating a custom menu/widget area

I'm looking to create a /menu/widget area like the following site: http://www.microsoft.com/en-gb/default.aspx please see sections under downloads, security, support, about is this considered a ...
0
votes
0answers
13 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
16 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
1answer
2k views

Sticky menu for WP custom menubars

This seems simple, except that I am not able to figure it out. In a wordpress theme, how can I make a custom menubar below the header image stick at the top after scrolling down the page? Example ...
0
votes
2answers
379 views

Widgets not displaying in theme customizer

I am developing a new theme and I am using several sidebars in this theme. All works fine, but the widgets are not showing up in the theme customizer section. All widgets are working fine under ...
0
votes
0answers
31 views

Search form is not working in live site

I have installed a wordpress theme called suffusion. Search widget is not working in this theme. It shows nothing found always. I have search.php as below. It is working in local machine <?php ...
0
votes
4answers
4k views

remove <div class=“textwidget”> from text-widget

When you add a text widget to a sidebar in Wordpress the widget includes this code <div class="textwidget"> How do I remove this without editing the core? FYI - I think this line is located ...
0
votes
2answers
292 views

Change HTML structure for custom menu in sidebar

I've been digging for documentation on how to change HTML output for the "Custom menu" which you place in optional widget. So its clear what I meen I have attached an image of the widget block here: ...
0
votes
3answers
116 views

Tags Instead of Category

UPDATE: I have this widget that allows me to CHOOSE and SHOW the latest posts from a specific category in the sidebar. Here's the code; add_action( 'widgets_init', 'tie_categort_posts_widget' ); ...
0
votes
2answers
34 views

Can't Write Custom Widget Code In One ECHO

I am creating a WordPress custom widget and I created the below one that is working fine when I add it in function.php. <?php /* ...
0
votes
0answers
14 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 ...
0
votes
1answer
455 views

Right way to update widget on dynamic new input field

I have code to add an input field dynamicly in my theme. I have testd it, as a metabox and it works. But, not in a widget. First add and update, that codes work, but when I refresh page or try to ...
0
votes
0answers
10 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> ...
3
votes
1answer
685 views

Registering Sidebars and Sidebar Widgets. Sidebar Widgets Not Displaying

I am registering sidebars and sidebar widgets. The theme currently supports two sidebars. Primary and Secondary. add_action('widgets_init', array($this, 'add_sidebars'), 10, 2); public function ...
2
votes
1answer
260 views

Get Widget Instance inside Widget

I'm trying to access the $instance variable from a custom function I've written inside my Widget, but I keep getting a "variable is undefined" error. How can I re-create the $instance variable? ...
1
vote
1answer
138 views

jQuery does not work in widget backend

I created a widget which should use jQuery for switching between two views and implement the jQuery UI date picker. I was wondering why my jQuery code does not work as I noticed that the date picker ...
0
votes
2answers
16 views

How to retrive widget title/data

I'm using this code to display widgets of certain sidebar: $sidebar_id = 'sidebar1'; $sidebars_widgets = wp_get_sidebars_widgets(); $widget_ids = $sidebars_widgets[$sidebar_id]; foreach( ...
0
votes
0answers
18 views

Widget Popular Posts

I want add "code 1" inside "code 2", but I don't know how I can do this. CODE 1 (found here): <ul class="popular_posts"> <?php $pc = new ...
0
votes
0answers
8 views

Widget Logic code for different PMP membership levels

I'm using both Paid Memberships Pro and Widget Logic plugins. In PMP, I set up 2 membership levels - one free ( id# = 3) , one paid (id# = 1) With Widget Logic, I'd like to have the custom sidebar ...
0
votes
0answers
9 views

Run function after theme is installed for the first time

I want to run a function to add default widgets for my theme when it's installed for the first time. I tried add_action( 'after_switch_theme', 'add_theme_widgets' ); but it resets the widgets back to ...
4
votes
5answers
3k views

Different widgets on different page templates?

If I have a couple of different Page templates, how would I show a different collection of sidebar widgets for each of these templates? I'm using the Starkers theme as a starting point.
1
vote
2answers
309 views

Add description to custom text widget and display the 5 recent post titles

I just started coding and working as an intern for a company. My boss asked me to create a custom text widget for practice in making word press widgets. The problem I am running into is I have no idea ...
3
votes
2answers
584 views

Full width layout for custom post type pages

I'm trying to remove a widget area called 'Primary' from a certain page on a site. This is the function where I manage the sidebars: //ADD CATEGORIES IN SIDEBAR OF SINGLE POST TYPE add_action( ...
1
vote
1answer
48 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 ...
2
votes
3answers
2k views

Shortcode from a widget is wrapped in unwanted <p> element

I'm using Black Studio TinyMCE Widget as a rich text editor widget. In a sidebar I inserted the TinyMCE widget with a [testimonial] shortcode and some content after it. For example: [testimonial] ...
4
votes
1answer
398 views

Using wp_category_checklist in a widget

I'm trying to use wp_category_checklist in a widget to display a list of checkboxes which, when saved, remain ticked. I'm having awful trouble at the moment getting them to save, as as far as I know ...
0
votes
0answers
25 views

php- What can be the best alternative to eval()?

I am using WordPress and for some reasons I need to execute php in my WordPress text widgets. I googled and found this code to add in functions.php file: add_filter('widget_text', 'php_text', 99); ...
1
vote
0answers
19 views

Widget area inside a widget

I tried putting dynamic_sidebar('widget-id') inside a custom widget I created and it worked. The only thing I can't figure out is how I can do this through a loop. Is there a way that when the widget ...
0
votes
1answer
369 views

Multiple entries in get_option results? or why is _multiwidget set to 1?

I am developing a wordpress widget, and need to store some user configuration values, that is why I am using wordpress update_option and get_option. I am new to widget development. I have some ...
2
votes
1answer
126 views

Multisite Widget/Content

I'm using WordPress multisite and need to display content across all subsites in the sidebar. This is a network of 50+ sites so updating all 50+ sidebars with this content every few days is not ...
2
votes
2answers
407 views

Elegantly using JavaScript on widget admin forms

I'm working on a project involving a lot of widgets, and I'm thinking it'd be really great to have a "More options" section built using jQuery UI Accordion that expands when clicked. So, I've ...
0
votes
1answer
22 views

How do I make the title of the following widget editable?

I have the following widget which displays basic info for a game: class Game_Info_Widget extends WP_Widget { /** * Register widget with WordPress. */ public function __construct() ...
0
votes
0answers
31 views

Add classes to individual sidebars

This is my first time posting on here so let me know if I don't follow any rules or best practices. I'm creating several sidebars through our WordPress site and not all of them will be styled the ...
0
votes
2answers
23 views

Register Script in Plugin Widget

I need to load a separate js file into a widget and just can't get it to work. So far I have if ( is_active_widget( false, false, $this->id_base, true ) ) { function tab_widget_scripts() { ...
9
votes
2answers
554 views

Executing Javascript When a Widget is Added in the Backend

I have widgets that have javascript controls attached to them. If the widget is present when the widget admin page loads, the controls work correctly. When I add a new widget, they do not work ...
-1
votes
2answers
3k views

How do I stop out of stock items from appearing on my WooCommerce site when using the Layered Nav widget [closed]

WooCommerce includes a handy Layered Nav widget. This allows you to filter the catalog items based on attributes that you've set, including for variations of items (like different sizes.) However, if ...
1
vote
3answers
292 views

jQuery UI inside widget on admin page

I have created a widget that has quite a few settings, and so I am trying to create a tabbed menu (using jQuery UI) inside the widget settings of the admin page. The problem is basically that tabs ...
1
vote
0answers
15 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", ...