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

learn more… | top users | synonyms (1)

1
vote
2answers
267 views

How can I disable widget from being visible on some pages?

I have two widgets in my sidebar, a jQuery vertical menu and an image handler. I need to disable the jQuery widget on my contact page (or hide it or something like this), so that it wont be shown. ...
1
vote
2answers
377 views

Register widget only page is a singular of custom post type

I've made a custom post type, with a few accompanying widgets, and I was wondering if it is possible to show (some of) these widgets only if you're on a specific page. Currently I've got function ...
1
vote
1answer
744 views

Widget: Custom Post Type Post Listing Dropdown on Admin Side

Widget: I'm making a custom widget with the following functionality on the admin side. 3 text fields 2 dropdown menus to select posts by title (both from a single custom post type) Right now, ...
1
vote
1answer
251 views

How do you categorize pages?

I am an experienced Drupal developer who is just getting stuck into Wordpress. For a selected number of pages on a new wordpress build, I need to add them into a category, then add this category ...
1
vote
2answers
815 views

modify a output of a widget

I'm to implement a theme in wordpress. Is possible modify a output (html) of widget in wordpress? For example, the "recent comments widget"?
1
vote
1answer
205 views

Add pagination to listing plugin

I am trying to figure out on how to add pagination to your listing. Think you could help me out? I have added the read more button and manage to customise the listing styles. What's left is the ...
1
vote
1answer
38 views

widgetlogic and permalinks

I'm trying to use widgetlogic to conditionally display menus on certain pages. Each menu uses a tag like is_page(array("Page Name", "Page Name 2" ...)), and works perfectly until I try to change ...
1
vote
1answer
592 views

How to rename wordpress Widget

I want to rename "Widget" to something else Like "Block" or something else. please help me. EDIT Per the user's comment below, she wants to change class="widget" to class="block" (or any ...
1
vote
3answers
229 views

Disable dashboard drag&drop

I need to disable drag&drop functionality for dashboard widgets. This should be realized with jquery, just as it is for the dashboard_browser_nag. I'm no jquery expert - so can anybody tell me ...
1
vote
1answer
451 views

How to display more than one instance for a widget?

I'm using a plugin called Recent category post widget. Unfortunately the plugin developer is no longer offering support. The way this plugin is coded, displays only one instance of the widget (meaning ...
1
vote
2answers
1k views

How to display an RSS feed widget inside a page?

I have an RSS feed (link) that I would like to display as a widget inside one of my posts. The wordpress RSS widget already does that on the sidebar, is there some solution to have it in the post? ...
1
vote
1answer
70 views

allow user to style widget backgound per widget

Is there a way to allow a user to style a widgets backgound per widget? Lets say there are 4 widgets in the sidebar, i want the user to be able to style the first 2 with a blue background, the second ...
1
vote
1answer
612 views

Run JS after widget settings are saved?

I've written a small widget that uses JS for setting up some tabs in the settings panel. Is there a way to re-trigger the tab JS when the widget is done saving? Looking at the WP JS source it doesn't ...
1
vote
1answer
691 views

Widget textarea input gets formatted

I've built a small widget for my website It has a couple of inputs, and a <textarea> among others. Whenever someone inputs to the textarea it adds a tab at the begining and changes every ' to ...
1
vote
2answers
73 views

I'm trying to find a basic plugin for displaying images in a widget [closed]

I've tried and installed loads of free WP plugins that can't do what I would like them to do. I write a fictional news blog and I'd like to be able to display about a dozen or so adverts that I've ...
1
vote
3answers
289 views

Custom html widget with a Joomla-style assigment

I was unable to find a custom html widget with Joomla style assignment. Like you create a module (widget), define some HTML and assign it to certain menu items (or set it to show everywhere except the ...
1
vote
1answer
572 views

widget dropdown menu code

I'm trying to put in a simple dropdown menu in my widget. I copied one out of a previous widget and trying to substitute my own values into it. The submenu shows, but when I click save, it saves ...
1
vote
1answer
82 views

how to put functions inside of widgets

I'm trying to put my own function in a widget but it doesn't run. I want to use it everywhere within the widget. If I could see an example,that'd be great.
1
vote
1answer
216 views

Custom random quote widget breaks when used in multiple sidebars

I've created a custom widget and placed it in functions.php. You can see the widget here: http://pastebin.com/3uWpeaFx (I've also created a similar widget that grabs a random image; it's included ...
1
vote
1answer
1k views

Widgets with groups / sub widgets? Widget in a widget?

I tried to find anything about adding a widget within a widget area. That widget should be a widget group / sub widget area. I've found a plugin that does this: ...
1
vote
2answers
390 views

Hooking in to replace the Sidebar/Widget areas

The Goal: To replace the sidebar on all sites across my network with content loaded from a plugin, across all themes. I need a way of over-riding the sidebar/main widget area on all sites across my ...
1
vote
1answer
120 views

Show widget differently depending on if it's in the sidebar or footer

I've made a custom widget which shows thumbs of my latest videos. These thumbs are set to be 300px wide, which is the same width of my sidebar. My problem is that i also want to be able to use it in ...
1
vote
2answers
132 views

Adding a Widget : what to put in plugin URL

I am signing up to add a widget to wordpress.org here: http://wordpress.org/extend/plugins/add/ What do I put for the field "Plugin URL"? Would that URL be the svn repository I am currently hosting ...
1
vote
2answers
543 views

Get posts after today (upcoming events)

I'm using PHP Exec to build a widget to show a list of upcoming events: <?php function filter_whene($whene = '') { $whene .= " AND post_date >= '" . date('Y-m-d') . "' "; return $whene; } ...
1
vote
2answers
468 views

Changing widget options via the functions.php when there are no hooks

The problem: to change a widget's options with a custom function in functions.php, when there are no useful hooks, and where there are multiple occurrences of the same widget (multiwidget). This ...
1
vote
3answers
365 views

How can I assign widgets from WP to appear in bbpress?

The usual set-up: www.domain.com - wordpress installation with sidebars and widgets; www.domain.com/forum - bbpress. BBpress is integrated via bbpress-integration plugin. The question is - how can I ...
1
vote
2answers
380 views

Dividing widgets in sidebar?

I'm having a custom sidebar called Footer. I'm displaying this sidebar using this code: <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Footer') ) : ?> (maybe I should ...
1
vote
1answer
75 views

Do widget options need to be escaped widget()?

I was wondering if you really need to escape user submitted data (widget option fields) within the widget() and form() functions (from the widget class) ? I don't see a reason to do this, if the data ...
1
vote
1answer
434 views

How to pass data from page to widget functions?

I need help,need to pass data from page,to widget function,I need to pass author id to widget,any idea? Tnx
1
vote
2answers
541 views

get_option returns undesired blank instance of a widget

I am presently trying to call the fields of a custom widget using get_option and loop through the array created from the get_option() call. The issue is that it is outputting a blank one at the end, ...
1
vote
1answer
781 views

Paging in a sidebar mini loop

I switched to another theme and decided to make a widget of some default code I had in there which shows my delicious posts, twitter posts, su posts and youtube vids in a custom loop (excluding these ...
1
vote
2answers
2k views

Adding a rich text editor to a widget - specifically CKEditor

I am trying to add a rich text editor to a widget and am using CKEditor ( http://ckeditor.com/download ) with a simple toolbar. Everything works fine until I try to save. When clicking on "save" the ...
1
vote
1answer
999 views

Help with custom widget options! (saving checkbox option)

I created a custom Flickr Widget for Wordpress and successfully set up an options form for users to enter their Flickr information, but I cannot get the checkbox in the form to save whether or not it ...
1
vote
1answer
17 views

Insert Widget option into mark-up with register_sidebar

I have added a custom field to my all widgets in my theme, called "custom-title". I have managed to save the field into the database for each widget, like so: s:12:"custom-title";s:17:"HELLO TEST ...
1
vote
2answers
62 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
30 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
1answer
38 views

Which settings/options are saved on a theme-basis and how does this affect theme-switching?

I realized that when switching the theme (in my case to a child theme) some things don't stay the same: Widgets Menus At least this is what I found out so far: Widgets Don't lose widgets when ...
1
vote
0answers
74 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
1answer
88 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, ...
1
vote
1answer
39 views

Registering a stylesheet inside my WordPress widget

I did see the other topic similar to this but I cannot get mine to work. I am using WordPress 3.8 and am creating a custom widget for a site. I need to style it a certain way so I need to load an ...
1
vote
1answer
110 views

How i can widget ID get after drag for wordpress with jquery?

I create custom widget with select option image but first time selected option image are not showing after saving this function work perfectly,I need this function only load after Drag in sidebar ...
1
vote
1answer
52 views

Why does my widget break other widgets?

So this widget i created is killing all other widgets registered in the same sidebar. Meaning, nothing renders after this widget does. No other widget markup makes it to the DOM. After hours of hair ...
1
vote
1answer
319 views

Adding WordPress colorpicker in widget settings

I want to add the WordPress default colorpicker in widget settings form. Here's what I'm trying: In my functions.php, I have this: function widgets_scripts( $hook ) { if ( 'widgets.php' != $hook ...
1
vote
1answer
91 views

Restrict access to specific widget field based on user role

I'm looking for a way to restrict the ability to drag certain widgets to specific widget areas in the widget editor. For example, I would like to restrict the widget field 'ads' to only be available ...
1
vote
0answers
180 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
1answer
109 views

Dashboard Widget Form

I created a Dashboard widget to send push notifications to an app, but the way I have it coded, whenever I make changes in the Plugin Editor and press Update File, the code gets ran and I get a blank ...
1
vote
0answers
98 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
54 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
1answer
605 views

Display Widgets Horizontally in Area [closed]

I am building a custom bootstrap 3 theme. I have created a new widget area for my header and am trying to get the widgets there to display horizontally, in line. I've looked up several tutorials, but ...