0

How to execute custom loop before loop content?

<?php

    remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
    remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 );
    remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 );
    add_action('genesis_entry_content', 'gt_custom_loop');

    function gt_custom_loop() {

        // this gets executed after the page content, how to make it execute before?

    }

    genesis();

?>
  • 4
    This seems specific to Genesis and might be better aimed at their support. – Rarst Nov 9 '15 at 21:59
0

Try using the genesis_before_content hook.

add_action('genesis_before_content', 'gt_custom_loop');
function gt_custom_loop() {

    // this gets executed after the page content, how to make it execute before?

}
  • Thanks, actually what I was looking for was to insert the HTML after the header, but I believe both would do the trick. Thanks. – HelpNeeder Nov 10 '15 at 20:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.