Widgets are configurable elements used to dynamically build sections of a WordPress theme.
3
votes
1answer
126 views
How to target the default Recent Posts and Recent Comments widgets with pre_get_posts?
I added the following to my functions.php:
add_action('pre_get_posts', 'keyl_get_emp_posts');
function keyl_get_emp_posts($query) {
if ($query->is_main_query())
...
2
votes
1answer
156 views
I need some direction on how to have a sidebar based on meta rather than page
I'm working on a plugin that allows the user to create "page/post types", customize the type style, then tag a page/post with that type. All of this works. My problem is this plugin also needs to ...
2
votes
1answer
30 views
Trying to wrap <span> around first word of multiple word strings with a widget_title() filter, only works on two word strings and not more than two
I am trying to wrap a around the first word of multiple word widget titles. I have used the answer from here:
...
1
vote
1answer
16 views
Including a custom post type in the Archives widget
I have a custom post type called "videos" that I want to include in the Archives widget (stock widget in the TwentyTwelve theme). It DOES already appear on the archives page, but just not in the ...
1
vote
1answer
78 views
How to create a dashboard widget for one user
I will start by warning you that my programming skill is limited.
I need to create a dashboard widget that will display in the WP dashboard for the users with the user_id=21.
So far I have tried the ...
1
vote
1answer
147 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 ...
1
vote
1answer
193 views
How Can I Duplicate a Widget?
By duplicate, I don't me copy the code from a (core) widget and change it a bit. That's pretty easy.
I want the push button ability to grab all the settings from a given widget, copy them, stick them ...
2
votes
0answers
81 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
0answers
68 views
add widgets to dashboard for easy access for clients?
I have a widget created:
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Featured Video',
'before_widget' => '',
'after_widget' => '',
...
1
vote
0answers
319 views
How to create a 'single' category widget for woocommerce plugin
Woocommerce out of the box provides many widgets, however the category widget for providing a product search, groups ALL the categories into one widget.
I want a widget for one category, i.e. 'shop ...
1
vote
0answers
24 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
108 views
How to use jQuery on widget admin page
I have a lengthy form config for my widget so I thought about using radio buttons to hide and show the relevant input fields instead of having them all after each other. But it doesn't seem to work. I ...
1
vote
0answers
68 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
109 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
127 views
Widgetize Buddypress Activity Plus plugin?
Is there anyway to widgetize the Activity Plus plugin so I can display the post form in a widget area on my Genesis News child theme front page? I'm using the BP Sitewide Activity Widget to display ...
1
vote
0answers
47 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 ...
1
vote
0answers
81 views
How to call widget by widget's id?
Is it possible to call widgets using it's id?
for example I have a sidebar. In this sidebar I put meta widget and tag cloud widget. I have got their id's ($widgets_list): 'meta-2' and 'tag_cloud-2'. ...
0
votes
0answers
19 views
The widget->form parameter is empty even though options have been saved
Why is $instance empty in Widget->form($instance)?
How comes WP can use it to fill out the form , but I don't have access to it's contents?
The widget is technically working, I can save the ...
0
votes
0answers
18 views
Custom widget using get_categories select menu dropdown
I have created a custom widget that is supposed to display a select menu with all the categories the blog has. I have used get_categories to compile the list. This works fine and all categories appear ...
0
votes
0answers
14 views
Wordpress $wpdb->query() inserts multiple rows with duplicate data
I am experiencing very strange problem with wordpress query() function.
I have a form on page 1 where below code to insert a new record.
if(isset($_POST["transaction_id"])){
global $wpdb;
...
0
votes
0answers
29 views
Custom widgets in theme option page
I'm trying to create a simple theme options page that uses widgets to change the layout of content on the front page.
I started off by using meta boxes not realizing that the position is based on ...
0
votes
0answers
21 views
My blog has a design issue.
My blog has been getting a good visitors these days. I have used linkwithin add ons to show related posts. But the problem is it is showing related posts in even homepage. Is there any way to not to ...
0
votes
0answers
22 views
Widget Disappearing in IE
Im debugging my site in IE, and my widget area is disappearing.
http://pcdconsultancy.co.uk/
Any ideas? I have no transparency or anything on this.
0
votes
0answers
29 views
Getting a “Cannot modify header information - headers already sent by…” after duplicating widget
This probably isn't the smartest way to go about it, but I'm very close to launch and the client wanted a news widget displayed two ways. Our theme's news widget displays a settable number of news ...
0
votes
0answers
55 views
Custom “Latest News” widget wipes out the site
I want to register a custom "Latest News" widget, which would be teh exact copy of the default "Recent Posts" widget, with minor modifications.
Here's the original code, taken from the ...
0
votes
0answers
14 views
Widgets input/content not visible
I created a theme, and when I drag and drop a widget in the widgets area the widget's content is hidden.
This is what I attempted:
Switch with other theme and activate my theme (doesn't work)
copy ...
0
votes
0answers
21 views
Adding custom widgets to theme sidebar on activation
I have a custom widget in my theme with the id of "widget_my_box_menu" and I'm trying to add that widget to my theme's main sidebar on theme activation. The main sidebar's id is "home-sidebar-widget"
...
0
votes
0answers
28 views
List.js inside WordPress widget
I am trying to implement list.js (http://listjs.com/) inside my WordPress widget, so far with no success.
At first I have tried it in a simple index.html file outside the WordPress environment just ...
0
votes
0answers
17 views
Hide Widgets depending on Custom Field Value
I have Wp-Types Toolset as my WP building blocks and with it I created a Custom Field Group called Featured Listings. Within the group I have a field called Featured Ads and that has Radio Button ...
0
votes
0answers
35 views
Avoid duplicate posts from sidebar widget on homepage?
In a normal dynamic sidebar of a theme's homepage template the sidebar widgets display lots of duplicate posts on the front page.
It shows "recent posts" and posts from certain categories in main ...
0
votes
0answers
26 views
Get Related Posts (custom post type) of Custom Taxonomy, Most to Least?
I'm working on an image page feature which retrieves the MOST related posts ("image" custom post type). So images with most terms in common should be listed first. But this does not seem to be ...
0
votes
0answers
10 views
Reuse form function of widget in an option page
Can I reuse the form function of a widget in an option page to use it to store default values for the widget and its shortcode?
0
votes
0answers
21 views
wordpress pages sidebar widget missing on homepage
http://www.dual-diagnosis.org.uk/
The Sidebar widget with my links in on the right is missing from the home page, it appears everywhere else just not here, any ideas?
0
votes
0answers
23 views
Adding a widget breaks my child theme - *But I'm not calling any widgets!*
I'm trying to design a child theme, based off of twentytwelve, and I'm running into a puzzle I can't even figure out how to troubleshoot.
Basically, my theme explodes when I enable any widgets.
It ...
0
votes
0answers
41 views
Wallpress responsive page element with widgets
Recently, I use a free responsive themes from designwall.com named wallpress (http://www.designwall.com/wordpress-theme/wallpress/).
I'm a wordpress beginner, so there are several stuffs I still ...
0
votes
0answers
60 views
Widgets not restored from backup
I've done a little searching here to try to find what I need but most people seem to have these issues when they're moving a site or changing the sql. I'm doing neither so I can't figure out why ...
0
votes
0answers
23 views
Copy Widget Settings because of changed IDs
I want to update a customers blog to a child theme that is based on a newer version of the actual deployed theme. My problem is, the developers of the theme changed the IDs of sidebars. In the old ...
0
votes
0answers
27 views
Move Widget Meta Box From Appearance to Pages
Is it possible to relocate the widget/sidebar meta boxes that normally appear at Appearance > Widgets so that they appear as a meta box on a specific page's Page Edit dashboard page?
Here's what ...
0
votes
0answers
45 views
I need to create a dashboard widget with input field and will display the text as shortcodes in posts
Hi I need to make automated price updater of my learning materials (e-books, videos, posters etc.) and it's such a drag every time I need to change prices on them to open every single posts because ...
0
votes
0answers
20 views
Widget Management/Sidebar Strategy for CMS sites
I've been mulling of this question for a while and try out different approaches for each site: What is a flexible approach to managing widgets on a CMS sidebar that is easy to use and maintain as well ...
0
votes
0answers
27 views
Any way to duplicate an entire sidebar?
I was an early adopter of Wordpress, in 2004. It has come a long way, but the Widgets admin panel has not.
I have to make multiple (maybe 20-30+) sidebars for one site, and so I'm facing the prospect ...
0
votes
0answers
47 views
Widget won't show up on the front end
I have a question very similar to one I recently posted, where instead of the widget not showing up at all, it now shows up in the admin area, you can drag it, and any other widget over to the sidebar ...
0
votes
0answers
33 views
custom siderbar with custom cat post widget does not include content
I am trying to make a template with a left sidebar. In that sidebar I want to insert custom cat post query using a text widget so I can format it correctly the way I want. However when I do The ...
0
votes
0answers
23 views
Widget options disappear when dragged to widget areas
When dragging a widget to a sidebar, it gets added, the throbber spins for a second and then all of the options within the widget disappear. So, the frame for the widget is there, but it's just empty. ...
0
votes
0answers
17 views
Sidebar If Query
I have this query which I'm using in the sidebar, but when I place it in a php widget, the whole sidebar disappears... Any ideas?
global $wp_query;
$postid = $wp_query->post->ID;
if ( ! empty( ...
0
votes
0answers
44 views
Widget Display Options
in regards to my previous question. I am playing around with the widgets page and have added a google maps feature to the "Pages Sidebar" Tab.
the google maps feature displays on the contact page, ...
0
votes
0answers
95 views
Facebook plugin activated, widget in sidebar yet doesn't show on page - stumped
I have the official Facebook plugin v.1.3 on my website. The plugin is activated, the Facebook Like Box widget can be moved into the sidebar and all options set, yet it doesn't show up in my sidebar. ...
-1
votes
0answers
22 views
disable drag of a widget in a single sidecar
I Have build A HOME page with 2 sidebar
I have created a widget and this widget show A slider only if the sidebar is sidebar 1
my purpose is alert the user with an alertbox if the widget is dragged ...
-1
votes
0answers
19 views
category widget in wordpress
I have about 2000 video post to be posted. and lot many no. of categories for those videos.
I just do not want the category list to keep growing on and making my page lengthier. Could anyone suggest ...
-1
votes
0answers
39 views
Is it possible to dynamically add widget areas?
I am creating a very custom and unique theme that uses posts as sections for the front page. The posts all have a configured style to them, so I am wondering if it is possible to dynamically create ...
