How do I enable dynamic content in a theme cached with WP Super Cache?

I've been trying to improve my caching strategies in the themes I build, but I'm having trouble understanding how "Enable dynamic caching" works in WP Super Cache. There's very little information on this through searches, and what I have been able to find has been extremely technical, targeted towards one non-cached region, or otherwise not helpful.

So far what I've been able to discern is that there are global, secret, tags that get replaced with the dynamic content when a page loads. What I can't figure out, though, is how to set up multiple of these. As far as I'm aware, you can only use define("DYNAMIC_OUTPUT_BUFFER_TAG", "") once, otherwise the value will be overwritten by the later declarations.

I'm looking for a guide on how to serve simple dynamic elements to different areas of a page.

For example, if I had the following requirements:

  • Display the current time in the header via current_time("c")
  • Display the current users IP address in the footer via $_SERVER["REMOTE_ADDR"]

How can this be achieved while maintaining caching for the rest of the page?

Related Links:

Topic plugin-wp-supercache cache Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.