- This topic has 3 replies, 2 voices, and was last updated 3 years, 11 months ago by
Tom.
-
AuthorPosts
-
March 25, 2017 at 2:47 am #297117
Martin
Dear Tom,
Its probably a silly question, but I cant seem to make it work π
I used the Generate_Before_Footer_Content Hook in my Child Theme to add a rich footer which I can style in a post like this:
<?php do_action( 'generate_before_footer_content' ); // Starting Rich Footer $my_id = 128; $post_id_128 = get_post($my_id); $content = $post_id_128->post_content; $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); echo '<div class="m-page-content"><div class="f-content">'.$content.'</div></div>'; do_action( 'generate_footer' ); do_action( 'generate_after_footer_content' ); ?> </div><!-- .site-footer -->
the one thing missing for is: How can I make sure the rich footer is corrctly marked up as WPFooter?
<footer class="site-info" itemtype="http://schema.org/WPFooter" itemscope="itemscope">
-> Would have to include the Before_footer_Content elements πEverything else is perfect as it is, just the opening footer must move up to include the new rich footer π
I would so happy if you could point me to the right direction :)!
March 25, 2017 at 8:31 am #297235Tom
Lead DeveloperLead DeveloperIf you’re hooking into the before footer content hook, then it should be inside the built-in footer element which includes that schema data by default.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentMarch 26, 2017 at 8:15 am #297541Martin
Hey Tom,
I can’t confirm that – tried to used GP Hooks, added the php code to the “Before Footer Content”-Hook
<?php
$my_id = 128;
$post_id_128 = get_post($my_id);
$content = $post_id_128->post_content;
$content = apply_filters(‘the_content’, $content);
$content = str_replace(‘]]>’, ‘]]>’, $content);
echo ‘‘.$content.’‘;
?>It displays perfectly and beautifully, only the footer tag is not adjusting – Could you give me a hint where to have a look to adjust? All caches were cleared to make sure changes were reflected.
Thank you! π
March 26, 2017 at 9:57 am #297582Tom
Lead DeveloperLead DeveloperCan you show me the page?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.