• Resolved startribe

    (@startribe)


    Hey Community,

    I have a question about includes. If I had WordPress in a directory as such:

    /root/wordpress/wp-content/templates/my_template/index.php

    would it be possible to use an include that picks up from the root. for example:

    <?php include('../../../../products/item_1.php'); ?>

    Any ideas on how I might be able to do something like this? I’m actually trying to use bbPress and WordPress to pull from the same directory for advertising products, and I think I need some brain storming here.

    Any suggestions would be greatly appreciated.

    All the Best,
    Orion

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter startribe

    (@startribe)

    Sorry, I’ve included this in the wrong forum on accident, I hope it gets bounced.

    Thread Starter startribe

    (@startribe)

    Hey Community,

    I have found a solution, and we are using a folder titled global includes in our root folder. This folder inculdes all includes that are used for the headers, sidebars, banners, and etc.

    One note for those who try this, you must include the full url in the include.

    All the Best,
    Orion

    Can you detail the solution ? I’m trying to do that with the full url and it does not work

    OK, I found somewhere else. To make it clearer for other people like me : “full url” means full server path

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘include from wordpress parent’ is closed to new replies.