Okay
  Public Ticket #2284519
Change the heading tag
Open

Comments

  • calyweb started the conversation

    Hi,

    I want to change the heading of two so_widget titles : Featured Pages and Icon With text. It's displaying an H4 for Features pages and an H5 for Icon with text, but on my website they come directly after an H2 so it's not nice for SEO. I tried to change the heading directly to H3 on the folder of the main theme but it does not change anything...

    Can you help me to do this with my child theme ? Many thanks !

  •  369
    OrionThemes replied

    Hi,

    Changing headings might cause styling issues, so you will probably need to write some additional CSS to fix it. And I don't think there will be much impact on SEO. Personally I would advice against changing this.

    But if you are decided to change the headings, and want to do it on your own risk, here is how it can be done:

    There are two Recycle-plugin files you will need to change.

    • /recycle-plugin/widgets/so-widgets/orion-icon-text-w/tpl/orion_icon_text_w-template.php
    • /recycle-plugin/widgets/so-widgets/orion-featured-pages/tpl/orion_featured_pages-template.php

    Open them in your favorite text editor then just search and replace all instances of "h4" with "h3". 
    After saving, the changes should already be visible.

    I hope this helps.

    Andrej

  • calyweb replied

    Hi,

    Is it possible to override these files by using a child theme, to avoid to make the modifications at any updates ... I just don't know the path to have in the child theme

    Thanks

  •  369
    OrionThemes replied

    No, but you can easily create your own widgets inside your child theme and use them instead. 

    To do that, you'll first need a widget folder in the child theme, where you can place all of your widgets.

    1. You can register your widget folder in your child theme's functions.php:

    function add_my_awesome_widgets_collection($folders){    $folders[] = 'path/to/my/widgets/'; // important: Slash on end string is required    return $folders;
    }
    add_filter('siteorigin_widgets_widget_folders', 'add_my_awesome_widgets_collection');

    More info here: https://siteorigin.com/docs/widgets-bundle/getting-started/creating-a-widget/

    2. Then just copy existing widget files, rename it and rename the widget function names (must have unique names). This way you will be able to use your, modified version of the widget.

    3. After you register widget folder, you might need to enable them in Plugins -> SiteOrigin widgets.

    I hope this helps.

    Andrej