Issue with Content Hook on Archive Pages
-
Hello,
I recently installed the plugin and everything worked fine except the paywall was activating on my archive pages. After looking into the Tinypass shortcode I realized this was caused by the registered tinypass_intercept_content on the hook firing when I was filtering my content previews using the_content filter.
Rather than running at the_content, perhaps hook at wp_head and check the actual page loaded. At this point if this page is behind the paywall, set a global boolean variable to true and register a hook at the_content filter that if the global variable is true to return an empty string. This enforces the veracity of the paywall as well.
In my particular instance, I didn’t change the actual plugin to allow upgrading and just stripped running the_content filter against my excerpts in exchange for more verbose regular expressions.
- The topic ‘Issue with Content Hook on Archive Pages’ is closed to new replies.