[Support request] Moving WPFooter up to include Before_Footer_Content

Home Forums Support Moving WPFooter up to include Before_Footer_Content

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #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 :)!

    #297235
    Tom
    Lead Developer
    Lead Developer

    If 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.

    #297541
    Martin

    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! 🙂

    #297582
    Tom
    Lead Developer
    Lead Developer
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.