• Is there a theme tag or other mechanism to know when a page’s main-content generation is beginning? when it has ended?

Viewing 2 replies - 1 through 2 (of 2 total)
  • https://www.wpmods.com/run-a-function-when-post-published
    well….not exactly what you are after, but possibly useful depending on what you are after….

    What exactly are you after…. like an example?

    Thread Starter yoopits

    (@yoopits)

    Note: I already have a workaround, but it makes my plugin theme-dependent.

    I wrote a plugin that defines a shortcode. My buggy theme is executing the shortcode function twice. If I had a way to test whether content generation has started, I could avoid the theme dependency, because I could easily abort the shortcode function when it’s being run at the wrong time.

    (I’m pretty sure my theme is causing the problem, because the plugin works correctly in a test environment with a different theme.)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘when is page's main content being generated?’ is closed to new replies.