New Landing How can we help? Themeforest Theme Support Uplift Change Widget Title from H3 to H1

Viewing 12 posts - 1 through 12 (of 12 total)
  • Posted in: Uplift
  • #330178
    FGraphix
    Member
    Post count: 15

    Hi I use the text-clock element quite often and the widget-title. The widget-title is set to h3 I want to change to change the widget title from H3 to H1. How can I do this?

    Thanks

    #330184
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    That’s only possible editing the code, the best alternative would be to add some custom css to that h3.

    example:

    .title-wrap .spb-heading{
       font-size:14px!important:
    }

    -Rui

    #330185
    FGraphix
    Member
    Post count: 15

    That is going to restrict my SEO especially I build my websites off of headline hierarchy H1 -> H6 . What do you recommend?

    Thanks.

    #330188
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    Multiple h1 on a page are detrimental to your SEO.

    We supply filters to allow you to override the heading HTML via a child theme function.php.

    The filters are called sf_sidebar_before_title and sf_sidebar_after_title. Do you have programming knowledge to utilise that and change the output or do you require assistance?

    #330293
    FGraphix
    Member
    Post count: 15

    I am somewhat familiar with it. I found it. However how do I write this for a child theme?

    Thanks

    /* SIDEBAR FILTERS
    ================================================== */
    function uplift_sidebar_before_title() {
    return ‘<div class=”widget-heading title-wrap clearfix”><h3 class=”spb-heading”><span>’;
    }
    add_filter(‘sf_sidebar_before_title’, ‘uplift_sidebar_before_title’);

    function uplift_sidebar_after_title() {
    return ‘</span></h3></div>’;
    }
    add_filter(‘sf_sidebar_after_title’, ‘uplift_sidebar_after_title’);

    #330305
    David Martin – Support
    Moderator
    Post count: 20834

    Inside the child theme functions.php file you would write your own two functions to return new values for both filters, ex:

    function uplift_sidebar_before_title_custom() {
      return '<div class="widget-heading title-wrap clearfix"><h1 class="spb-heading"><span>';
    }
    add_filter('sf_sidebar_before_title', 'uplift_sidebar_before_title_custom');
    
    function uplift_sidebar_after_title_custom() {
      return '</span></h1></div>';
    }
    add_filter('sf_sidebar_after_title', 'uplift_sidebar_after_title_custom');
    #330573
    FGraphix
    Member
    Post count: 15

    It’s not working, the H3 class is still present..

    #330574
    David Martin – Support
    Moderator
    Post count: 20834

    I’d need to see your child theme code, do you have FTP details to provide me with?

    #330577
    FGraphix
    Member
    Post count: 15

    So you know I copied exactly what you provided. I can provide you a link if you prefer.

    #330612
    David Martin – Support
    Moderator
    Post count: 20834

    I’d need a code view, it’s possible your action may need a higher priority.

    Can you provide a zip file of your child theme for me? A dropbox link so I can download it will suffice.

    Thanks.

    #330620
    FGraphix
    Member
    Post count: 15
    This reply has been marked as private.
    #330623
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    Thanks but I would need a download link via dropbox or a github gist file.

    Try amending to this:

    function uplift_sidebar_before_title_custom() {
      return '<div class="widget-heading title-wrap clearfix"><h1 class="spb-heading"><span>';
    }
    add_filter('sf_sidebar_before_title', 'uplift_sidebar_before_title_custom', 100);
    
    function uplift_sidebar_after_title_custom() {
      return '</span></h1></div>';
    }
    add_filter('sf_sidebar_after_title', 'uplift_sidebar_after_title_custom', 100);
Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register