Add custom markup to footer

Hello there,

Is there a correct place to add markup to the footer? I added the following Recite Me markup to a copy of base.php in the child theme, which activate a voice plugin.

<?php do_action( 'x_before_site_end' ); ?>

    </div> <!-- END .x-site -->

    <?php do_action( 'x_after_site_end' ); ?>

  </div> <!-- END .x-root -->

  <div id="reciteme_button" class="reciteme">
      <a href="#reciteme">
        <img src="/wp-content/themes/x-child/images/accessibility-icon.png">
      </a>
  </div>

<?php wp_footer(); ?>
</body>
</html>

However, this causes the footer to break and disappear.

Should I add this via the Theme Options?

Cheers,

Spencer

Hey Spencer,

Please install and activate the child theme and login through FTP then edit the functions.php then add this code:


add_action('wp_footer, 'add_footer_code');
function add_footer_code(){
?>
  <div id="reciteme_button" class="reciteme">
      <a href="#reciteme">
        <img src="/wp-content/themes/x-child/images/accessibility-icon.png">
      </a>
  </div>
    <?php
};

Hope this helps.

That’s great, and works perfectly.

Thanks for getting back to me.

Regards,

Spencer

You’re welcome!
We’re glad @Jade were able to help you out.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.