• Resolved AP

    (@wppluginpalace)


    Dear support,

    I have two questions pertaining to the <footer>:

    1. Is it possible to move the <div class=”site-footer”></div> inside the actual <footer> object?
    2. I need to add a very simple <div> just above the Widget area, however, there is no hook called “generate_before_footer_widgets” – is there an alternative to this hook that will accomplish my goal?

    Thank you.

Viewing 8 replies - 1 through 8 (of 8 total)
  • ying

    (@yingscarlett)

    Hi there,

    1. You need to take a copy of the footer.php file from the parent theme, paste it to your child theme folder, change line 25 <div <?php generate_do_attr( 'footer' ); ?>> to <footer <?php generate_do_attr( 'footer' ); ?>>, and change line 51 </div> to </footer>.
    2. The hook element is a GP Premium feature, we can not answer questions that are related to the premium plugins per WP’s regulation, please open a support topic in GP’s premium support forum, we will be happy to help there.
    Thread Starter AP

    (@wppluginpalace)

    My apologies, I’ll repost on premium support. Thank you.

    Thread Starter AP

    (@wppluginpalace)

    Ying, per my first question, I’ve created a child theme, activated it and I can see the original footer.php output properly by way of the child theme. However, the code on lines 25 and 51 do not match up to your references/revisions. Additionally, I only copied over the footer.php file into the child theme. The Widget block(s) would be in another file, no? I imagine I’d need to combine the two scripts from the respective files, or at the very least, call the Widget in the footer.php – that’s my guess, but I could wrong. Please advise when you can. Thank you.

    • This reply was modified 5 months, 3 weeks ago by AP.
    ying

    (@yingscarlett)

    However, the code on lines 25 and 51 do not match up to your references/revisions

    It should be, here’s the original file of footer.php:https://github.com/tomusborne/generatepress/blob/f0227eb702ccfa8345e8b26967edcb9c24301253/footer.php#L25

    For your second question, we will be answer you in the premium forum, there is a hook you can use.

    Thread Starter AP

    (@wppluginpalace)

    See image below. That is a screenshot directly from the GeneratePress footer.php file in the parent theme. I have not changed this code whatsoever.

    ying

    (@yingscarlett)

    That’s not the file, I meant the footer.php in the root folder, the path is /wp-content/themes/generatepress/footer.php

    Thread Starter AP

    (@wppluginpalace)

    ?? I am so sorry – I feel extra stupid now lol I can handle from here. Thank you!

    ying

    (@yingscarlett)

    No worries, it’s confusing, the two files have the same name ??

    Just keep in mind that only the template files in the theme’s root folder can be overridden using a child theme.

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