0
votes
2answers
23 views

Wordpress - registering sidebar and adding a button directly after .textwidget

I have registered a new widget area, code as below and want to add a button after the .textwidget, however cannot seem to do it properly. Adding it after the </li> results in the button not ...
0
votes
1answer
61 views

List sibling pages widget, exclude current page

I successfully created a widget that displays sibling pages to the current page I'm on in the sidebar. Only thing is, I'm not capable of excluding the current page - can someone please assist here? ...
0
votes
1answer
64 views

New checkbox in custom widget isn't saving data

I'm trying to develop my own widget. Mostly cause I want to understand Wordpress functionality (yes I'm completely new. First ever try to extend wordpress) I want to add a function to display post ...
0
votes
1answer
130 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
1answer
38 views

the_widget() inside functions.php

I'm setting some options in the backend using functions.php and I'm doing: $w = the_widget('My_Custom_Widget'); but I don't get any output. However doing <?php the_widget('My_Custom_Widget'); ...
0
votes
1answer
84 views

Error with function in functions.php?

I am using the below function in my custom theme to load posts via AJAX. But for some reason it is breaking the WP ADMIN WIdget Drag and Drop and also showing the White Screen of Death when I uploaded ...
0
votes
0answers
40 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
4answers
1k views

Programmatically Add Font-Awesome Icons to Category Widget

I use the Categories widget on my sidebar(s) and I would like to display a Font Awesome icon next to each category listed in the widget. The icon would be the same for all categories, for now, but I ...
1
vote
3answers
171 views

right_now_content_table_end function not working?

I noticed recently my custom counts for custom post types are not showing on the dashboard. Im using this function: right_now_content_table_end It worked well before, Im not sure when it stopped ...
0
votes
1answer
143 views

display most popular tags in two columns

I have a section in my sidebar where I'd like to display my most popular tags in two columns. I found this post from WPSnipp that details how to narrow your list down to only the most popular, however ...
1
vote
2answers
261 views

Passing values from a widget to a function within a plugin

I have a plugin that is built with many widgets. A widget's bundle. Each widget creates it's own custom CSS code. Instead of having messy source code where I display 15 different sets of inline CSS ...
0
votes
1answer
268 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 ...
1
vote
0answers
65 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 ...
0
votes
1answer
51 views

My widget won't update its values when save is clicked

So this is my first attempt a creating a widget that has a functionality of creating a simple image rollover effect (if anyone wants it when it's done, leave me a message). Now I downloaded a sample ...
0
votes
2answers
1k views

Custom Sidebar only on single post

I am developing a child theme for the new twenty thirteen theme and I am trying to add a sidebar (widget area) next to my content. I only want it to display in single posts. What I did: edit ...
1
vote
1answer
60 views

Ajaxing function in widget class

I want to ajax function declared in function Widget in widget Class ,it have arguments belong to the widget i try this code add_action('wp_ajax_my_func', 'my_func'); ...
1
vote
2answers
87 views

Dynamically Register Sidebars For Each Top Level Page

I have a small website that wants a different sidebar for each page containing blocks of text, blocks of images, and blocks of links, etc. What I'm trying to do is register a sidebar for each top ...
0
votes
1answer
80 views

How to conditionally add a widget via a hook in functions.php

I'm trying to add some widget areas to the homepage only using functions.php - so that the client won't be able to accidentally destroy shortcode when editing the page. I've registered the widget ...
0
votes
1answer
324 views

Creating a custom wordpress widget and stopping js from running twice(once in active widget once in widget selector)?

Ok so here's the question how do i stop js from running twice on the widget.php page? I am creating a ajax loaded custom image selector from a domain on the same server as the current site. I want ...
0
votes
3answers
493 views

Custom Widget outputs the input but doesn't save anything inside the textarea

I've been working on my first widget, Everything works perfectly except it doesn't save anything I add to the textarea box. It will output the input on the website however. From research I think its ...
0
votes
1answer
58 views

Override widget in function WordPress

Im trying to override the text widget in WordPress. My code looks like this: class WP_Widget_Text_Custom extends WP_Widget { function __construct() { $widget_ops = array('classname' ...
0
votes
1answer
214 views

How Do I include/Import a Custom Widget from the Parent theme into My Child Theme?

I'm trying to make a small modification to a custom widget that was included with a clients parent theme. Whenever I remove the parents version of the widget (for testing purposes) the child version ...
0
votes
1answer
65 views

Add a select-option to the default widgets

I would like to add an extra feature to one of the default widgets so that the user can choose from the select-field to either align the widget to the left, center or to the right. How would I be ...
2
votes
2answers
209 views

javaScript in <head> section of WP API

How do I place the following javaScript in the <head> section of the Wordpress Widgets API menu screen? <script type="text/javascript"> jQuery(window).load(function() { ...
0
votes
1answer
634 views

Widget update function not saving values

Hello WordPress Answers! I'm having trouble with the widget update function saving values correctly, but first let me explain the situation. I'm writing a simple news ticker widget plugin, which ...
0
votes
1answer
93 views

Trying to output a “Most visited blogs” list in wordpress multisite

Does anyone know how to get a "most visited" list out of Wordpress Multisite? I got alot of bloggers and have been looking for a way to output a top 10/20 list of most visited blogs, but cant find ...
1
vote
1answer
250 views

Dashboard widget custom positioning?

I cannot figure out how to arrange my custom widgets one left and one right. I'm using this code to create custom widgets: //Add my comments. Shows user his last 5 comments function ...
1
vote
1answer
64 views

Want to be able to sign up subscribers as authors

I want to be able to select a subscriber an author of a post in the admin so it displays their name as having written the post, but I do not want to give them any additional privileges (if they login ...
1
vote
2answers
107 views

How do you Permanently Delete Sidebars

I'm developing a custom theme and I added some widgetized sidebars like so: register_sidebars(2, array('name'=>'Foobar %d')); I then recreated them so that I could give them semantic names. Like ...
0
votes
1answer
75 views

Give a function a unique ID

I'm developing a theme that uses a Twitter Tweets custom widget (Not coded by me). There are several widget areas within the theme and if I try and include the Twitter widget in say the sidebar and ...
2
votes
1answer
525 views

How to generate and display widgets areas dynamically?

I want display different content in sidebar for every category, but as I create new ones I have to create the area for it. How can I have widget areas for every category and also display them on theme ...
0
votes
3answers
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 ...
2
votes
2answers
758 views

What is the most efficient method for loading widgets in functions.php

I have seen WordPress developers use two different methods for loading custom widgets from the functions.php file. The first: include("functions/my-custom-widget.php"); The second: ...
6
votes
1answer
1k views

What is the difference between wp_register_sidebar_widget and register_widget?

What's the difference between them and when should we use each one ? I'm using wp_register_sidebar_widget right now and it's working fine but I've seen a lot of tutorials online on how to create a ...
3
votes
2answers
2k views

Need to create a Theme demo site that features multiple themes

I would like to create a site like: http://demo2.woothemes.com/?name=sentient for my clients, so that they can see the range of themes I offer. I own many templates from different providers, and ...
5
votes
2answers
2k views

How can I get $id variable in widget's form function?

How can I get $id variable in widget's form function? According to widget's structure I see that widget function have $args as a parameter, which will be extracted in function's body. In my case i ...
0
votes
1answer
119 views

Code in custom widget queries all posts, when it should only query the current post

I have a query in a custom widget (my first one!) which, if it's of custom post type book, retrieves the post ID. This then gets used in a WP_QUERY to retrieve data about the page. This works ...
18
votes
2answers
6k views

Between functions.php, widgets and plugins, which is loaded first?

Customer asks if a specific carousel plugin he uses can be widgetized. That means i should create a widget inside functions.php which calls the plugin's function. That means that the plugin's code has ...
0
votes
1answer
593 views

Add a custom function to widget code

Hopefully, this is an easy question - I'm just a bit confused. I've got a custom widget with the usual structure: class My_Widget extends WP_Widget { function My_Widget() { // widget actual ...
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

Missing argument 3 for wp_register_sidebar_widget()

I installed the Deprecated Calls plugin and it's telling me to change register_sidebar_widget() and register_widget_control(), essentially add wp_ first. I did but I'm getting Missing argument 3 for ...
1
vote
1answer
433 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