home.social

#theloop — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #theloop, aggregated by home.social.

  1. New post on my website!

    Using the loop_end Hook With Multiple WordPress Loops
    I tried to add some custom navigation at the end of the posts lists using the loop_end hook, but it got added twice. Another plugin was running through the Loop and calling rewind_posts(). To make my code only run after the visible Loop, I eventually just used the classic set-a-global-variable approach.

    Update: as suggested below, I switched it to use did_action to check for a hook between loops, instead of messing around with globals.

    #WordPress #PHP #ClassicPress #HowTo #TheLoop