I'm building a site into which I'm incorporating a wordpress blog and during my customisation of a theme I've run into a slight snag.
I'm using a couple of widgets in the footer to display recent posts etc but they are displaying with their own inline styling. I can't find anywhere that may be adding the styling but I have found the function in the functions.php file that adds the id and class for the elements in question and I'm wondering whether I can add some php to the function in order to remove the styling that follows:
code is as follows:
function twentythirteen_widgets_init() {
register_sidebar( array(
'name' => __( 'Main Widget Area', 'twentythirteen' ),
'id' => 'sidebar-1',
'description' => __( 'Appears in the footer section of the site.', 'twentythirteen' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
the on-page code is like this:
<aside id="recent-posts-2" class="widget widget_recent_entries masonry-brick" style="position: absolute; top: 0px; left: 0px;">
so i want to leave the id and class but just strip out the "style" elements
I know php may not be the best way to do this so i'm open to suggestions but if i can pop a preg replace or reg ex etc into the function that would be great.
Cheers guys