MyBB Community Forums

Full Version: [PHP in Templates] Show in Certain Pages
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So I have an element in the header template that I actually want to only show in the index.php page (That element is to toggle sidebar). Is it possible make this happen using PHP in Templates plugin?
you can use code similar to below
<if THIS_SCRIPT == "index.php" then>required code</if>

note: unless php code is required in the templates, template conditionals plugin is preferred for the conditionals.
(2015-08-28, 09:34 AM).m. Wrote: [ -> ]you can use code similar to below
<if THIS_SCRIPT == "index.php" then>required code</if>

note: unless php code is required in the templates, template conditionals plugin is preferred for the conditionals.

Great! It worked! Thanks!