Double-wide widget on home page
URL to the page in question:
-
Client would like the “featured posts” widget on the home page to be the width of the contact widget (400 px). I went in and did the “obvious” by changing in Editor to the following:
*/
function FeaturedPostsWidget(){
$widget_ops = array(
‘classname’ => ‘featured-posts’,
‘description’ => __( ‘Display your recent posts’,’organizedthemes’)
);
$control_ops = array(‘width’ => 600, ‘height’ => 100);
$this->WP_Widget(‘featuredposts’, __(‘Featured Posts Widget’,’organizedthemes’), $widget_ops, $control_ops);
Didn’t change anything on the display. Your insight needed and appreciated, thanks!
KH
Kim,
Great question. That’s actually controlled in the style.css file (the code above affects the widget configuration panel in the admin).
You can place this in the Custom CSS box of the styling tab in the theme options page to change the width of the home page featured posts:
#home-middle .featured-posts {
width: 589px;
}
The default is 589 pixels, but you can change the value there to fit your needs.
Let me know if you have any trouble,
Bill
Thanks, Bill: can you go to the page which we have been working with today, and look, please? It’s the “news flash” widget box…I changed it to 700, then 900, but it is appearing to be about 300.
Thoughts?
Thx, KH
Sorry Kim. I gave you a snippet to change the featured post widget and not the recent posts that’s part of the WordPress core. Use this one instead:
#home-middle .widget_recent_entries {
width: 589px;
}
Hopefully that will work out better.
- The topic ‘Double-wide widget on home page’ is closed to new replies.