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
2answers
47 views

How to determine if the sidebar is empty? Or not active?

I used is_sidebar_active('NameOfSidebar'), but it seems not working. It returns false all the time. I wanna have a condition that goes like this if('sidebar is not active'){ //must not display the ...
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
50 views

Dynamically display font icons in widget

All, have a movie review site that I assign a score to. Currently I'm using a widget which works fine...but I changed all of my scores to a 5 star rating system (3.5/5, 5/5, etc.) so the widget that ...
0
votes
1answer
34 views

Wordpress widget in custom theme

I created a custom theme and writing a basic widget for my wordpress based website. If I paste the code in functions.php the code works fine, however if I paste the code in a separate file and keep it ...
0
votes
1answer
62 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
0answers
34 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
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
1answer
178 views

Correct code to use php in text widget

This code is used to display php inside a text widget add_filter('widget_text','execute_php',100); function execute_php($html){ if(strpos($html,"<"."?php")!==false){ ...
0
votes
0answers
28 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 ...
-1
votes
1answer
25 views

What can I do to customize a widget provided with this plugin? from where have I to start?

I am using this WordPress plugin to create an immage gallery: http://wordpress.org/plugins/easy-media-gallery/ This plugin provide a single widget inside it and I would customize some litle function ...
1
vote
1answer
64 views

Displaying a variable stored in functions.php inside widget

I'm trying to display a variable that is stored inside my functions.php file - for the sake of the question this variable is stored as $test = 'test';. When i use echo $test inside page.php, ...
0
votes
1answer
143 views

Widgets not showing in my custom theme

I am developing this WordPress custom theme: http://onofri.org/WP_BootStrap and I am trying to insert a widget area under the Partner e Sostenitori section, but can't work. I have performed the ...
0
votes
1answer
60 views

Template from scratch: Sidebars not showing widget

I have an issue wherein i have a plugin (newsletter) which has a widget whereby users can (usually) subscribe to a newsletter and other functionality. But i digress. I have been trying to create ...
0
votes
1answer
36 views

Name Input from widget displays Sidebar name instead of saved data

I wasn't sure how to title this question,so I apologize. Let me first state that I have no experience with this type of code but I really need to this feature for my website, so I appreciate all the ...
1
vote
1answer
1k views

Create Image Uploader for Widget

I found this post// Use Media upload in custom widget on wordpress 3.5 I'm not experienced in any of this so I pretty much just copied the code he provided into my own functions.php file. I uploaded ...
0
votes
1answer
55 views

Wordpress - show number of comments for each post in widget

I have installed a plugin that lets me put a PHP code into the widget - basically, what I want to do is to create a "recent posts" area, where you can see a cover of the post (featured image's ...
0
votes
1answer
26 views

Using existing widget code! [closed]

Maybe this was answered many times but I couldn't find my answers so here I go: Am I allowed to use widgets php code from other existing themes and modify it for my needs?
0
votes
2answers
132 views

How to allow PHP In WordPress text widget

I want to add a text widget to my new WordPress website, but in the text widget there are some PHP snippets and I am finding it difficult to do it. Please help me Guys.
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
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 ...
0
votes
1answer
29 views

Widget header unique classes

I have created the code below for one of my widget sections. Currently I am able to manipulate the title bar with (h3.home-widget-header) which is good. But obviously it will be for all widgets in ...
0
votes
1answer
83 views

conditional tags for the output of a plugin

I'm still quite a newbie developer so small problems like this bring me to a stand still from time to time. I've basically built a custom plugin to display pdf images next to a link very basic I ...
0
votes
1answer
38 views

Banner editable from backend

Im trying to create a widget area. Ive added this to the theme. <?php if ( dynamic_sidebar('myWidgetName') ) : else : endif; ?> And then i register the area with function ...
0
votes
1answer
172 views

My custom widget won't stay in the widget area after I refresh the widget page

As the title says, i've been developing a simple image rollover widget, now that I'm almost done, the widget won't stay in the sidebar areas after I drag and drop it in and refersh the page, any idea ...
0
votes
1answer
62 views

key( $GLOBALS['wp_registered_sidebars'] ) is always showing the same value

I am using this code from another answer add_action( 'dynamic_sidebar', 'wpse_96681_hr' ); function wpse_96681_hr( $widget ) { static $counter = 0; // right sidebar in Twenty Ten. Adjust ...
2
votes
1answer
1k views

How to include checkbox in widget backend form?

I'm trying to include a checkbox in my widget back end. But I cannot get the value (on or off) after the user submits it. I thought the value would be stored in "esc_attr( $check )" (as it is when ...
0
votes
2answers
114 views

Widgets in the loop if active

I'm trying to put a widget as "first post" if it's active.. and let the posts continue after that.. It works, but the first post disappears and the second post becomes the first in line after the ...
0
votes
1answer
96 views

Infinite-Scroll Plugin and Jetpack Infinite Scroll Plugin - Adding to “Thoughts” Theme

How do I enable infinite scroll (either with the infinite-scroll plugin OR the built in infinite scroll jetpack) on the "Thoughts" Wordpress theme? I'm a total noob at editing this stuff so if you ...
0
votes
3answers
502 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
2answers
72 views

random reason on refresh

I am editing the sidebar widgets and have added one for users who are not logged in or registered. the widget requests that users register or login and I am wanting to add a random reason (quote) as ...
0
votes
1answer
99 views

How to change links in the 3 main categories, on widget category, to a javascript function call

I'd like to know.. How could I change my 3 main categories links, so they call a javascript function? I'm using Snapshot Theme from WooThemes. Here's the current state of the website: ...
2
votes
1answer
77 views

nowplaying.include.php Will Not Display Results

Cyberchimps.com recommended I post here as they believed there may be a global issue with my request. I thought what I was missing was obvious and simple, but two months into this and being referred ...
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 ...
0
votes
1answer
63 views

Using a loop to build and update widgets

So I have a widget Im making which allows users to update 4 switches. Each switch has the same fields, name, description, price, amount so I decided to build the widget using a for loop instead of ...
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
2answers
301 views

How to make widget title accept php?

I am trying to make widgets accept php, but without resorting to plugins. So far I have enabled php for the widget_text but cant make it work for widget_title. I am using the following code in ...
0
votes
1answer
38 views

Stuck with sidebar registering

I tried to add a custom page to my Wordpress template. That part is good. What I´m stuck with is a common sidebar that appears although I registered a custom sidebar for it. I am calling the ...
6
votes
2answers
680 views

What is the correct way to build a widget using OOP

I am working on a simple search form widget, with a built in autocomplete capability (You can download the current version here). The plugin is working, but I am currently rewriting all the code using ...
0
votes
2answers
298 views

Transform php code into a widget?

how can I create a widget out of a php code? It's just a disqus code that I would like to place in the sidebar. I could just paste the code in the widget section (my tag), but then I would not be ...
0
votes
1answer
328 views

Dynamic Sidebars & Echo

I can sucesfully get my dynamic sidebar to work like so: <div class="sidebar sidebar-first"> <ul class="widget-area first"> <?php dynamic_sidebar( 'pop-photos-sidebar' ); ...
0
votes
1answer
288 views

Call plugin with php function

This plugin only works as widget. I need call this plugin with php function. How to modify this code ? <?php /* Plugin Name: AJAX Calendar Plugin URI: ...
1
vote
3answers
597 views

Wordpress widget/sidebar dividers?

I have a widget sidebar, but I'd like dividers between them. I can achieve this in CSS using boring borders, but I have a png image I'd rather use instead. Is there a way to insert a divider after ...
0
votes
1answer
715 views

PHP Widget and do_shortcode

I'm using PHP Widget which allows PHP code to execute from a widget. I tried using this code to execute do_shortcode but it's not rendering <?php $lat = get_field('woo_maps_lat'); $long = ...
1
vote
1answer
231 views

Setting up widgets in wordpress with a unique ID for the after_title argument

I try to get the collapsible-widget-area plugin so that every widget it creates inside the collapsible area has a unique id <div> after its title. function get_args() { $this->args = ...
5
votes
1answer
2k views

How display widget by id

I fetched widget id this way: $the_sidebars = wp_get_sidebars_widgets(); print_r( $the_sidebars['sidebar-1'] ); It shows: Array ( [0] => recent-posts-2 [1] => recent-comments-2 [2] ...
0
votes
1answer
136 views

Edit the Publish Widget Options

Another noob question - under the 'Publish' widget in a default vanilla installation of WordPress 3.3.1, we would like to 'simplify' the Publish widget/ Specifically, we would like to have no 'draft' ...
-1
votes
2answers
2k views

How to add homepage Widget?

How do I add a 'Homepage' widget to my widget bar in Wordpress 3.3 ??!! EG: Dashboard > Widgets > Homepage with same fields as others
0
votes
2answers
571 views

Don't display a sidebar widget when on a specific page

I am trying to stop latest blog items from displaying in the blog section of my site. I have used the following code: <?php if ( is_page('blog') ) { ?> <h2>Don't display ...
4
votes
3answers
1k views

Has anyone managed to integrate the wp_editor inside a widget?

Adding this in the widget form method: wp_editor($text, $this->get_field_id('text')); seems to work. But after you press the "Save" button the widget goes funky... Adding ...