Text Widget creates a
I think WordPress widgets create li tags on default. If you want the bullet points removed you could fix that with a css approach. .widget li { list-style: none; }
I think WordPress widgets create li tags on default. If you want the bullet points removed you could fix that with a css approach. .widget li { list-style: none; }
You can do it using Widget Context plugin or Widget Logic plugin. They work fine. I prefer Widget Context because it has more flexibility.
After some research and based on the answer from Eugene Manuilov I made a function that adds custom classes to widgets in a specific sidebar (‘sidebar-bottom’ in my case) based on the number of widgets set in that sidebar. This will suit perfectly in horizontal sidebars and themes based on twitter bootstrap that need spanX … Read more
The default Recent Posts Widget code is in includes/default-widgets.php but you should not be hacking Core code. Copy that function to your theme’s functions.php, rename it, and create your own customized widget.
I’ve did a quick test on just changing the option and it seems to work. What I did is: Wrote a widget that has just 2 fields: “Title” and “Name”. Add several instances of this widget to my sidebars. Been sure that they are shown correctly in frontend. Edited the class to use 3 fields: … Read more
The answer is mostly no. The “enhanced” text widget was designed to work like the post editor as much as possible, including autop which might break whatever HTML that can not stand the conversion of lines into paragraphs. Several people have released plugins to restore the former functionality, but 4.8.1 will also include an “code” … Read more
I just found the answer and instead of putting this in the Title: <!–:en–>My English Title<!–:–><!–:fr–>My French Title<!–:–> We need to put this code: [:en]My English Title[:fr]My French Title and qTranslate does the rest 🙂
You can use the widget_display_callback (fired, predictably, just prior to displaying a widget 🙂 ). add_filter(‘widget_display_callback’,’wptuts54095_widget_custom_title’,10,3); function wptuts54095_widget_custom_title($instance, $widget, $args){ if ( is_single() ){ //On a single post. $title = get_the_title(); $instance[‘title’] = $instance[‘title’].’ ‘.$title; } return $instance; } The $widget argument is an object of your widget class, and so $widget->id_base will contain the … Read more
You should be able to call wp_enqueue_script() as part of your Widget output. Edit Quick-and-dirty, using the bare-bones Widgets API class example: <?php class wpse48337_Widget extends WP_Widget { public function __construct() { // widget actual processes } public function form( $instance ) { // outputs the options form on admin } public function update( $new_instance, … Read more
You just call get_sidebar() from index.php and it loads the theme file sidebar.php. register_sidebar(), on the other hand, is used for widgets where plugins and such want to dynamically add content in your sidebar.php file if your theme supports it. In your case, is there a file called sidebar-footer.php in your theme’s directory?