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();

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

1 Answer 1

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?

}
1
  • 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, 2015 at 20:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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