[Resolved] H2 tag and widgets

Home Forums Support [Resolved] H2 tag and widgets

Home Forums Support H2 tag and widgets

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1890961
    Mihail

    Hello everyone! πŸ™‚

    The question is not that important. In addition, it may seem somewhat strange. But since I have the opportunity to communicate with the developers, I still ask.

    So the question is:
    why do you put the name of the widgets in the sidebars in the h2 tag?

    scr1

    This is fundamentally wrong from the point of view of the SEO.
    After all, h2 usually contains the headings of articles.

    Roughly the same question applies to the title of the comments. In the case of the GP, you put it in h3.

    scr2

    What for?
    Ideally, widget titles should be in div or span tags. As a last resort in paragraphs(<p>).

    Thanks for the explanation πŸ˜‰
    ps. sorry for my bad english.

    #1891015
    Mihail

    And immediately one more question.
    I found this thread that said how to change the title tag. Added it to functions.php and nothing has changed.

    add_filter( 'generate_start_widget_title', 'tu_adjust_widget_title' );
    function tu_adjust_widget_title() {
          return '<h3 class="widget-title">';
    }
    
    add_filter( 'generate_end_widget_title', 'tu_adjust_widget_title_end' );
    function tu_adjust_widget_title_end() {
          return '</h3>';
    }

    I am using WordPress 5.8, GP 3.0.4 and GP Premium 2.0.3.
    Perhaps this does not work in the new version of WordPress?

    #1891120
    Leo
    Staff
    Customer Support

    Hi there,

    That code should work still.

    Can you link us to the page in question with the code added and without any caching plugin?

    Let me know πŸ™‚

    #1891199
    Mihail

    Okay, np.
    site: http://wcdrop.hostenko.net/
    this site will stop working soon (in a few days).

    attach login and password. You can log into the admin panel. I allow πŸ˜‰

    #1891287
    Leo
    Staff
    Customer Support

    Hmm looks like the block widget is the problem.

    However, couldn’t you just select your own heading if you are using a block widget?
    https://www.screencast.com/t/j8WeCY57ZR

    I believe the filter should work if you disable the block widget:
    https://docs.generatepress.com/article/disable-the-block-editor-in-widgets/

    #1891757
    Mihail

    However, couldn’t you just select your own heading if you are using a block widget?
    https://www.screencast.com/t/j8WeCY57ZR

    Hmmm…
    I somehow missed this moment. I did not pay attention to the fact that now you can independently change the title (its tag).

    It looks like a lot of changes await us starting with WordPress 5.8.

    #1892293
    Leo
    Staff
    Customer Support
    #1892321
    Mihail

    What about my first question? πŸ™‚

    So the question is:
    why do you put the name of the widgets in the sidebars in the h2 tag?
    This is fundamentally wrong from the point of view of the SEO.
    After all, h2 usually contains the headings of articles.

    #1892327
    Leo
    Staff
    Customer Support

    This is fundamentally wrong from the point of view of the SEO.
    After all, h2 usually contains the headings of articles.

    I’m not sure where you are getting this from but I feel like that’s more of a personal opinion from the article you’ve read or something.

    I just checked the two most recent Twenty series themes and they are using h2 as widget titles as well.

    #1894307
    Mihail

    I read just the right information πŸ™‚

    The higher the tag, the higher its priority.
    h1 – the highest
    h2 – the lowest

    For example.
    What is the point of giving priority to such a heading as LATEST POSTS by enclosing this heading in h2? – It doesn’t make any sense.

    As for the standard WordPress themes… apparently, WordPress developers don’t take SEO into account at all. it is for this reason that we see h2-h3 headings in sidebars.

    Somehow like this πŸ™‚

    UPDATE:
    Or here’s another example.
    Take a look at the https://generatepress.com/ website, namely the footer headers. They are all in paragraphs. And it is right.
    https://prnt.sc/1nxcqcl
    That’s why I don’t understand what Tom was guided by when creating the theme, adding the h2-h3 headers to the widgets. Although at home he did it differently… πŸ™‚

    #1894399
    David
    Staff
    Customer Support

    Hi there,

    The GP theme has been around for over 7 years, and was built on standardised templates that existed in WordPress way before that. And in those templates, as you see in the core Themes, H2 widget titles become the ‘default’

    The advantage you have with GP is the Themes output can be filtered so you can change them to fulfil whatever structure you require, whether that be to conform to rote SEO practices or maybe the better practice of meeting WCAG standards or just generally better document layout. And now with WP 5.8 Block Widgets you also have the choice from within the editor.

    Ultimately you have the freedom to do as you feel best. But changing the default markup in the theme, is not something that could be done without massive consequences to a huge amount of sites that are quite happy with their H2 widget titles.

    #1894423
    Mihail

    Don’t get me wrong. I’m more than happy with the GP theme πŸ™‚

    It’s just that for several years I was tormented by the same question: why do developers use h2-h3 tags in widget titles, because as I said above, this is wrong in terms of SEO.

    And now, after purchasing GP theme, I had the opportunity to communicate with the developers. So I decided to ask why these tags are used.

    Something like this πŸ˜‰

    #1895755
    David
    Staff
    Customer Support

    Sorry if i came across a bit harsh – it wasn’t my intention πŸ™‚

    SEO i am no expert on – which means i cannot say is a H2 widget title right or wrong as each users/sites SEO strategy will be different. And each persons ‘schooling’ on Headings is different.

    For good HTML Structure and Semantics it is most certainly ok to start any new sections with a H2 title. And <aside> elements structurally are their own section. So on that basis they are correct to use. And is probably the best reason you see them being used there.
    Also considering WCAG standards they too follow this same structure. And personally i take WCAG guidelines more seriously then an SEO plugin or expert telling me differently.

    SEO = yep i see lots of recommendations and sites being built using <div>'s and <span>'s in place of a Heading. Which is completely wrong in terms of good HTML structure.

    Ultimately for me, its about the user first and how the visualisation of text makes it easier for them to navigate and consume information. To the user, what is the difference between a H2 or a <span> that is styled identically to look like a H2 ?

    Funny part of it all, on one hand sites like ahref go all the way to replace Headings with arbitrary tags.
    And yet other SEO sites like MOZ and backlinko uses Headings as just a way of applying styles to their text and have multiple H1s in some instances and Headings in no particular structure. And SearchengineLand just do as they please with a mixture of all things ( they use H3 for their sidebar headings )

    So on that note, i’ll leave it to the SEO Experts who like to sell you the ‘best practice’ to argue whether its right or wrong πŸ™‚

    But the great part is, with GP you can have them however you want!!! Yay

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