• Is it possible to either 1) setup a page so that is displays only the content area, ie no theme layout? or 2) hide the page until it has been loaded?
    I am trying to swap between chat channels using the Wise Chat plugin using Javascript (ie no page reload). I have had success by creating a page on my site which I embed as an iframe containing the chat. Hence the iframe gets reloaded for a channel change, but not the whole page. It is working, but I get an ugly flash of the whole page (theme and content) inside my iframe, before my css to hide the page kicks in. Either stregaty above would overcome this, but I can’t see how to do either of them.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter wmchugh

    (@wmchugh)

    What I failed to mention is I’m developing a plugin that will go to others with all sorts of themes, so the answer needs to not involve customising the theme.

    Moderator bcworkz

    (@bcworkz)

    Yeah, avoid iframes if you can, not to mention serving content that ends up being hidden.

    I would utilize a custom page template to generate the page content. Don’t call the usual wp_head() and wp_footer() functions. You still should do the “wp_head” action however.

    Templates are normally the realm of themes, but plugins can impose their own templates by using the “template_include” filter to direct template loads to your plugin’s folders.

    Thread Starter wmchugh

    (@wmchugh)

    @bcworkz, thanks heaps. I followed what you said, learned a ton, and have it working. Still using iframe, but now not needing to hide anything, and loading only what is absolutely necessary. 100% functionality, and looking 100% clean. Now to work out how to load it as a virtual page to avoid the need for adding a page in the database that only my plugin references ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hide page until loaded’ is closed to new replies.