Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1162432

    Why are blog Grid Links H3 and List Links H2? This makes no sense to use headings for these links in the first place and it’s a structural nightmare when using both on the same page. Any way out of this?

    #1162733

    you can use as many h2 and h3 etc as you like.
    If you want the weighting in the sense of SEO to be different, then you can either use the filter: avf_customize_heading_settings
    see here some explanations to it:

    https://kriesi.at/support/topic/timeline-milestone-h2-and-h3-tags-how-can-i-delete/#post-1098165
    and following answers. ( or see github : Link )

    or use one nice thing i use when i want to replace only the tags of an existing structure.
    This is a generally usable thing : https://kriesi.at/support/topic/widget-tags-remove-h3/#post-1016049

    in your case this comes to child-theme functions.php:

    function replace_tags_with_tags(){
    ?>
    <script>
      (function($) {       
          function replaceElementTag(targetSelector, newTagString) {
            $(targetSelector).each(function(){
              var newElem = $(newTagString, {html: $(this).html()});
              $.each(this.attributes, function() {
                newElem.attr(this.name, this.value);
              });
              $(this).replaceWith(newElem);
            });
          }
          replaceElementTag('h3.grid-entry-title', '<h2></h2>'); 
          replaceElementTag('h2.post-title', '<h3></h3>'); 
      }(jQuery)); 
    </script>
    <?php
    }
    add_action('wp_footer', 'replace_tags_with_tags');
    #1162735

    on the code above you can add as many changes you like to have semi-colon separated ( this part: replaceElementTag…
    The function on top is to transfer all attributes to the new tag.
    see here explanation: https://kriesi.at/support/topic/widget-tags-remove-h3/#post-1016082

    #1162740

    by the way the other method is elegant too and changes the standard settings before it they are built.

    but it is not so easy to get the right code

    #1162775

    Hi,

    Thanks for helping out @guenni007, did that help you out @dethfire?

    Best regards,
    Rikard

    #1162776

    Yes thanks for the help! Maybe in a future release you can have all the blog formats use the same heading?

    • This reply was modified 4 years, 11 months ago by dethfire.
    #1162833

    Hi,

    Thanks for the update. We’ll have a look if there is something we could do better with the headings in the theme in future updates.

    Best regards,
    Rikard

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