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

learn more… | top users | synonyms (1)

2
votes
0answers
31 views

Why won't my custom widget stay in the sidebar after a reload?

After I drag my custom widget into a widget area and reload the page it's gone. Any ideas? <?php add_action('widgets_init','register_postTypeWidget'); function register_postTypeWidget(){ ...
1
vote
0answers
84 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 ...
1
vote
0answers
25 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
0answers
184 views

Edit and make class-wc-widget-featured-products.php update-proof

Within the class-wc-widget-featured-products.php file I need to Remove this on Line 101: <?php if ( $r->post->post_title ) echo get_the_title( $r->post->ID ); else echo ...
1
vote
0answers
107 views

How to update the widget form when the image is selected?

I have created a custom widget. There are 2 things that I can't do: I need to open the new media uploader window when the button "Select The Image" is clicked. When the image is selected from the ...
1
vote
0answers
55 views

Issue understanding and using WordPress filters and actions

I have a custom WordPress plugin that I have developed. The plugin is a widget bundle containing a bunch of custom widgets. The scenerio The plugin allows for custom css styles through creating a ...
1
vote
0answers
66 views

Custom taxonomy widget in admin area

I have a custom taxonomy set up on a custom post type and the box it uses is the same as categories, except I wanted to make it easily searchable using a filter script and then also allow the user to ...
1
vote
0answers
31 views

How to hook into unregistering a widget instance?

I would like to hook into a widget instance after it is removed from a sidebar panel on the Appearances -> Widgets admin page. So if the instance was an active widget and then removed, I would like ...
1
vote
0answers
101 views

Problem getting current post tags to show in a widget

I have tried tons of examples and suggestion on this topic but I can not get them to work. What I am trying to do is display the tags associated with the current post in a widget. I have built the ...
1
vote
0answers
166 views

Save Multiply Checkboxes in a Widget

Trying to save multiply checkboxes in a widget, but no luck. Here is my code: function update( $new_instance, $old_instance ) { $instance = $old_instance; $instance['title'] = ...
1
vote
0answers
72 views

Remove […] from RSS feed?

I would like to remove the [...] from the RSS feed widget. I have tried adding the following to functions: function replace_ellipsis($text) { $return = str_replace('[...]', '-', $text); return ...
0
votes
0answers
13 views

Trigger Submit Event when Widget is added to Sidebar

I need to trigger the submit or "Save" button for a widget when the widget is added to a specific sidebar in the backend. The reason for this is I am setting a certain taxonomy for a Dropdown Menu ...
0
votes
0answers
4 views

Server Side Includes not working in text widget

I'm trying to add Server Side Include code to a WordPress text widget, but the content is not being displayed. I've added SSI before on my non-WP site, but for some reason its not working with my WP ...
0
votes
0answers
19 views

Automatically add widgets to all pages

I have created a few pages and made them into menus. Also i'm using widgets on pages. Some of the widgets should be in all pages. In every page i need to add a short-code to that widget. Is there any ...
0
votes
0answers
21 views

How to echo Widget Title in Custom Frontend-Template Box

I've created a custom Widget with the help of following code: // Creating the widget class wpb_widget extends WP_Widget { function __construct() { parent::__construct( // Base ID of ...
0
votes
0answers
10 views

latest posts-widget displays all posts on archive page but works great anywhere else

I noticed the latest posts widget in my footer displaying all posts. Anywhere else on my page, it displays only the amount of posts it should. I am using a custom theme and this is my archive.php: ...
0
votes
0answers
15 views

Filter “widget_comments_args” won't work

I used "widget_comments_args" for changing comments query for Recent Comments, but it won't work. add_filter( 'widget_comments_args', 'my_function_name' ); function my_function_name( $comment_args ) ...
0
votes
0answers
18 views

Working widget does not show up in appearance->widgets

I try to add a custom widget for use outside of a normal sidebar. For that I have created class myfirst which extends WP_Widget and with appropriate function overrides. namespace widget; class ...
0
votes
0answers
17 views

How can I embed a .php file inside of a widget?

I have a currency exchange that I'm trying to put in the sidebar of my Wordpress site. The currency exchange is a simple php file that I'm trying to 'embed' as a widget. I created a simple plugin, ...
0
votes
0answers
13 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() { ...
0
votes
0answers
11 views

Enqueue script in Widget

I am trying to use wp_enqueue_script inside function widget of the Widget class. But it seems like when I print html it doesn't handle the javascript functions which I enqueue before. This enqueue ...
0
votes
0answers
13 views

Widget form method does not work properly

I need your help. I have this code <?php class Messenger extends WP_Widget { function __construct() { $widget_ops = array('name' => 'Messenger', 'description' ...
0
votes
0answers
14 views

How to change the title (name) color of new custom widgets in backend

I created a few custom widgets. The following part of the code set up the title (name) and description. How can i include a class for the widget title (name) to change the color of the name that ...
0
votes
0answers
11 views

How can I hide the dashboard widgets using install.php

I have created my own install.php file in the wp-content folder and I am using it as a drop in to customise my install of Wordpress. Currently I am using the following to hide (NOT) remove the ...
0
votes
0answers
18 views

Show sidebar from custom meta value

I want to show sidebar from meta value.Basically I am using wp-page-widget.Now I want to show the active widget.Since I am working on one page template so general procedure will not work. Upon ...
0
votes
0answers
11 views

why ’ quote double quote in database wordpress

i'm trying backup and restore database using php code. but i don't know why quote double quote show in database wordpress, something like ’, and destroy my wiget_text. So how can i fix that.? help ...
0
votes
0answers
44 views

Widget Select Options not saving

I have a widget where there is a select dropdown, with a list of all the pages on the site. I am trying to get my code correct so that when a user chooses a page, after clicking Save in the widget, ...
0
votes
0answers
33 views

How to give dynamic url path in widget?

I have a widget and give link to some text within it like href="http://www.netattingo.com/dev/imc/" as it is static path in widget but when I try to to use "site_url" or "bloginfo". It does not work. ...
0
votes
0answers
25 views

Widget Areas Still Appearing in WP ADMIN When They Shouldn't

I had a bunch of "Widget Areas" registered for my theme. I removed a few and added a few. The ones which I removed, I deleted the code which is hooked on widgets_init for registering the sidebars. I ...
0
votes
0answers
62 views

Dynamic css for a widget plugin

I have a plugin that creates a widget to show latest posts and I would like to add a dynamic css file to style the post title without using inline styles. So for example i have public function ...
0
votes
0answers
23 views

Wanted to collapse all the widgets in sidebar by default via jQuery

I already applied jQuery on footer to Slide them up but i noticed that when the page is completely loaded the widget slides up properly but dont know how this again slides down automatically. I m not ...
0
votes
0answers
17 views

Prevent submission of widget form

How can I prevent submission of a widget form? The following doesn't work for me. And preventing submit won't work because Wordpress uses Ajax for those forms. jQuery(document).ready(function($) { ...
0
votes
0answers
24 views

Display custom menu on specific post/page

I have a real problem with Wordpress. My need is this: I have three main pages that every one must display a list of sub-pages (custom menu) and a list of events related to that specific page. Both ...
0
votes
0answers
34 views

Hide widget on page

How can I hide a widget from a certain page (one page). After spending an hour, all I can find is with the plugins. The problem is, that I know with them how to do it, but one widget (ad widget) is ...
0
votes
0answers
55 views

Infinite scroll on sidebar widget

I am trying to add an infinite scroll functionality to a website i am building, but i want to add it to a sidebar widget. I have a widget that shows a list of recent posts, and i would like to add an ...
0
votes
0answers
10 views

Jetpack infinite scroll on widget

I would like to add the jetpack infinite scroll (other options would be good as well), to a sidebar widget that shows "additional posts". So instead of paginating (ajax) the whole page, i only want to ...
0
votes
0answers
15 views

How to include WP_Widget from another file in main plugin file?

I tried to use the code bellow in my main file: define( 'MYPLUGINNAME_PATH', plugin_dir_path(__FILE__) ); include MYPLUGINNAME_PATH . 'class/class-widget.php'; Then I have a file ...
0
votes
0answers
45 views

Custom widget not appearing on front end

I have the following widget location defined in my theme's functions.php: register_sidebar( array( 'name' => __( 'Opening Hours', 'transparent' ), 'id' => 'sidebar-hours', ...
0
votes
0answers
98 views

Custom Meta Boxes repeatable field show on single.php

I have some code that adds a Metabox, with repeatable fields to the edit screen of the WordPress backend. It looks like this: The code, I have in the functions.php, looks like this: function ...
0
votes
0answers
24 views

Wordpress API to get galleries?

Is there a way to get with wordress API the created galleries? The main idea would be to create galleries as normal wordpress pages or posts on and use those images in a wordpress widget.
0
votes
0answers
35 views

Question about file path for include/require methods

So I am currently rather new to Wordpress development and I had a question about the file path for the include() and require() methods. I have a php script within my Wordpress installation that I ...
0
votes
0answers
19 views

Widget Logic - Target 1 URL

TestSite.com/?property=Name How do I target only this URL with conditional tags and widget logic. I've tried is_singular( 'Name' ), but that didn't work.
0
votes
0answers
55 views

Create a widget to display image and Title?

I want to Create a Widget with image top and Title at bottom.Please help me to display like image top and Title at bottom also add link to to the arrow image. i have Created a Widget area and ...
0
votes
0answers
64 views

How to give a File Upload option in wordpress Widget backend?

I want to use a file upload Input option where User can upload a Excel file on backend and the widget will save the file in uploads directory and save the file link in the $instance variable of ...
0
votes
0answers
25 views

adding a dashboard widget for multisite

I would like to add a dashboard widget for a WP multisite and need to include/require a php file from a directory in my root. I combined a couple of things together that I found on different websites ...
0
votes
0answers
41 views

Widget editor not displaying in Dashboard

I'm not sure if this is because of the new 3.9 update, because I haven't had to mess with any widgets in a while, but my active widgets won't display in the editor anymore. I've uploaded a screen ...
0
votes
0answers
47 views

WPMU widget use sitewide

I'm using a widget on a site with the blogid 1. But I want to use the same widget with the content from blogid 1 in all of the other sites. Is there a way to reuse this widget? I tried the ...
0
votes
0answers
29 views

How can I add widgets to specific post

Some of my post are longer than others. On those post I want to display more widgets for social media and such to fill in space, as well as to gain more exposure. I know there are plugins but I ...
0
votes
0answers
53 views

Special characters showing in fallback font

I have created a widget that displays some text using a custom font imported with CSS @font-face. The font have support for scandinavian characters åäö, but when I display these characters in my ...
0
votes
0answers
24 views

What's the policy for building a theme that doesn't support widgets/menus?

I'm developing a minimalistic theme, and my plan is not to include menus or widgets in it. The Theme Review page on wordpress.org states: Whether implementing required, recommended, or optional ...