[resolved] Taking out a CSS element from Sidebar Widget titles (4 posts)

  1. NovaSev
    Posted 2 years ago #

    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.

  2. graphical_force
    Posted 2 years ago #

    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.


  3. Michael
    Forum Moderator
    Posted 2 years ago #

    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;


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

  4. NovaSev
    Posted 2 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic