Hide Sidebar From Dynamic Page Coming from Plugin
-
I have been looking for a solution to hide sidebar from my pages. Yes i know its not a big thing, we can use template for that.
But in my case i did not wanted to use templates because its not easy for end user to create template to use plug-in; so i was looking for some easiest way to render my page from plugin without sidebar.
So i used Shortcode for this purpose. I provided simple Shortcode to user to keep in Pages. And inside Shortcode i kept following PHP script to hide sidebar.
echo "<style>"; echo "#sidebar {display:none;}"; echo "</style>"; echo "<script type='text/javascript'>"; echo "document.getElementById('content').style.width='95%'"; echo "</script>";
Its works well for me. I want your suggestions and any other way to do this.
Thanks
LampRomy
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Hide Sidebar From Dynamic Page Coming from Plugin’ is closed to new replies.