WordPress.org

Support

Support » Installation » [Resolved] include from wordpress parent

[Resolved] include from wordpress parent

  • startribe
    Member

    @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)
  • startribe
    Member

    @startribe

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

    startribe
    Member

    @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

    Marie-Aude
    Member

    @marie-aude

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

    Marie-Aude
    Member

    @marie-aude

    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 ‘[Resolved] include from wordpress parent’ is closed to new replies.