• Resolved zak87

    (@zak87)


    Hi,

    There is one div wrapper which start in:

    header-footer-elementor/themes/default/hfe-header.php

    <div id="page" class="hfeed site">

    and ends in:

    header-footer-elementor/themes/default/hfe-footer.php

    </div><!-- #page -->

    And I think this div should be removed or to have 2 separated div’s – one for header and one for footer. Why? There is W3 validation error if I set just a Header or just a Footer.

    In first case the div will be opened in the “hfe-header.php” but not closed in the footer and in second case will be just one extra closed div in the footer – </div><!-- #page -->.

    In both cases there will be validation error.

    This is the first time that I am using your plugin to create a premium theme and I want to use on one demo default theme header + custom footer created with your plugin – but there is W3 validation error. I can not submit theme with that error. It will be nice if this can be fixed. Thank you.

    Great work by the way!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter zak87

    (@zak87)

    Me again.

    Maybe this will also help someone else.

    My “fix” for this is to add in my theme header one check if the hfe_footer_enabled is set and to add one extra div tag in my header.

    <?php if ( function_exists( 'hfe_footer_enabled' ) ) {
      if ( hfe_footer_enabled() ) {
       echo '<div id="page" class="hfeed site">';
        }
      } ?>

    The same thing should be in my theme footer to check if the header is enabled (and footer is not) to add one extra closing div tag:

    <?php if ( function_exists( 'hfe_header_enabled' ) ) {
     if ( hfe_header_enabled() ) {
       echo '</div>';
       }
     } ?>

    So, with this solution, there is no more “self-closed”/unclosed div’s and no more W3 validation errors.

    Best

    Plugin Support Team Brainstorm Force

    (@brainstormteam)

    Hello @zak87,

    Thank you for getting in touch with us!

    As you stated, in the case if the header is default and the footer is custom or vice versa, we can add an opening/closing <div> tag in the header/footer respectively.

    I am glad that you found a solution, however, it is not recommended to edit the current theme’s header/footer files as those will get overwritten with the theme’s next update.

    This also can be done with the help of a few action hooks. Please let us know if you need further assistance with this.

    Regards,
    Prajakta Suryawanshi

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘W3 validation error’ is closed to new replies.