Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #429317

    I’m trying to add something at the very bottom of the content of my site whether it’s a single post, a page, an archive for a custom post type, etc. I found the filter ava_after_content() and it seemed to be what I wanted. But I found that on an archive, it fires after each item that is being displayed on the page instead of one time after all the content has been output.

    I’m trying to be extremely neutral in my child theme and don’t want to have to modify all of the loop files to add a new hook that fires right after the while loop has completed. Can you suggest another way to accomplish this?

    Please let me know if that makes sense (or doesn’t).

    Thanks!

    #429319

    I found a solution for this here.

    add_action( 'loop_end', 'wpse107113_loop_end' );
    function wpse107113_loop_end( $query ){
         if( $query->is_main_query() ){
              // do stuff here
         }
    }

    That said, I wish Enfold had more hooks that happen before and after the start/end of structural areas and just inside those area as well. It would really open up the flexibility of the theme when it comes to wrapping custom designs around it.

    Thanks! You guys rock.

    #429533

    Hi!

    Thank you for coming back and posting your solution in the forum.

    If you think a hook should be implemented in the core, feel free to post your request here and we will check it. If it makes sense for other clients also, we will integrate it in the next release then.

    Best regards,
    Günter

    #429721

    Thanks Günter. Will do. Do you mean on this particular post or as a feature request?

    #429725

    Hi!

    Please do it here – https://kriesi.at/support/enfold-feature-requests/ :)

    Cheers!
    Yigit

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.