MyBB Community Forums

Full Version: how to include php file in index.php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi all

i want to include accodian menu items via php file.

how i can include my php file in index.php

how i am including file : <?php include_once("{$theme['imgdir']}/js/accord.php"); ?>


what is in my accord.php

<div id="accordion-1">
<dl>
<dt>First slide</dt>
<dd><h2>This is the first slide</h2><p><img src="{$theme['imgdir']}/img1.png" alt="Alt text to go here" />loremispum.<br /><a href="#" class="more">Read more</a></p></dd>

<dt>second slide</dt>
<dd><h2>This is the second slide</h2><p><img src="{$theme['imgdir']}/img1.png" alt="Alt text to go here" />loremispum.<br /><a href="#" class="more">Read more 2</a></p></dd>

</dl>
</div>


many thanks
instead of modifying index.php file, you can add the required code in index template after {$header} code
( admin panel --> templates --> * your theme's templates * --> index page templates --> index )
(2012-02-01, 02:53 PM)ranjani Wrote: [ -> ]instead of modifying index.php file, you can add the required code in index template after {$header} code
( admin panel --> templates --> * your theme's templates * --> index page templates --> index )

Sorry not in index.php i am doing on index template after {$header} code.

after {$header} I have included jqurey accordion and navigation that i want to include