WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Taking out a CSS element from Sidebar Widget titles

[Resolved] Taking out a CSS element from Sidebar Widget titles

  • Some background first –
    I’m using the FoundationPress theme as my base theme. I have a number of widgets set up in the WP Admin that populate properly.

    I’ve tried to add styles to these widget TITLES but it keeps showing in bold. Which I don’t want. After checking the source code I can see that something is automatically putting a <strong> tag around each title but I can’t find where it’s doing that after searching through many php files.

    All I want to do, is remove the <strong> tag from these titles. If I can do so in a way that I don’t have to keep going back and changing code after updates that would be better. I’d think a filter can achieve this, but I’m pretty new to php and WP in general so I’m not sure about how to construct this.

    Would REALLY appreciate your help here. It’s not a huge issue and I could deal with out fixing it – but it’s one of those things that will keep nagging at me.

Viewing 3 replies - 1 through 3 (of 3 total)
  • graphical_force
    Member

    @graphical_force

    It sounds like it may be controlled by some code similar to this:

    <?php $args = array(
    	'name'          => sprintf(__('Sidebar %d'), $i ),
    	'id'            => "sidebar-$i",
    	'description'   => '',
    	'class'         => '',
    	'before_widget' => '<li id="%1$s" class="widget %2$s">',
    	'after_widget'  => '</li>',
    	'before_title'  => '<h2 class="widgettitle">',
    	'after_title'   => '</h2>' ); ?>

    Usually it’s found in your functions.php file but I’ve not looked at the code of your theme.

    http://codex.wordpress.org/Function_Reference/register_sidebars

    Michael
    Forum Moderator

    @alchymyth

    the code seems to be located in your theme in the subfolder/file /library/widget-areas.php

    you could also try to over-write that with CSS;

    example:

    .widget h6 strong { font-weight: normal; }

    alchymyth – that worked like a charm thank you so much for the help in finding that area.

    I just changed the code in the widget-areas.php – appreciate your help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Taking out a CSS element from Sidebar Widget titles’ is closed to new replies.