[Resolved] Widget Titles

Home Forums Support [Resolved] Widget Titles

Home Forums Support Widget Titles

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #239005
    Bobby

    Hello Tom,

    I have a quick question. I was looking through the theme add-on features to see I could make my widget titles and blog sections look like the sample scree shot below:

    http://playerwags.com/wp-content/uploads/2016/10/sample-widget-area.jpg

    You see how each blog section and widget has a different title tag with the line connecting to the end of the widget container……

    I found this forum question and response below, but I don’t know if this would apply to what I’m trying to accomplish..

    https://generatepress.com/forums/reply/202899/

    I’m assuming this is something that would have be specifically customized via CSS and the theme files??

    #239072
    Tom
    Lead Developer
    Lead Developer

    It’ll take a little more than that, but it’s do-able:

    add_filter( 'generate_start_widget_title','tu_add_span_widget_title' );
    function tu_add_span_widget_title()
    {
          return '<div class="widget-title"><span>';
    }
    
    add_filter( 'generate_end_widget_title','tu_add_span_widget_title_end' );
    function tu_add_span_widget_title_end()
    {
          return '</span></div>';
    }

    Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/

    .sidebar .widget .widget-title {
        border-bottom: 2px solid #000;
    }
    
    .sidebar .widget .widget-title span {
        background: #000;
        color: #FFF;
        padding: 0 5px;
        display: inline-block;
    }

    Adding CSS: https://generatepress.com/knowledgebase/adding-css/

    Hope this helps ๐Ÿ™‚

    #239100
    Bobby

    That worked!! Thank you so much.

    #239105
    Tom
    Lead Developer
    Lead Developer

    You’re welcome ๐Ÿ™‚

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.