Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to include a php file?

  • Avatar of youlichika
    youlichika
    Member

    @youlichika

    is under the path in wordpreewp-contentpluginsbuddypressbp-themesbp-default
    Now I want include some one from the path wordpresswp-contentthemesmythemename.
    How to write correctly? Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Avatar of Roger Coathup
    Roger Coathup
    Participant

    @rogercoathup

    Where do you want to write the code – is it in a file in your child theme?

    If the files are in the same directory, e.g. in your child theme folder, use something like:

    locate_template( array( ‘myfile.php’ ), true )

    It sounds though as though you are wanting to modify code in bp-default. You shouldn’t be modifying bp-default! All your changes should be in your child theme.

    Avatar of youlichika
    youlichika
    Member

    @youlichika

    Sorry. I lost paste some code. I forget use `backticks`.
    “ is under the path in wordpreewp-contentpluginsbuddypressbp-themesbp-default
    Now I want include some one from the path wordpresswp-contentthemesmythemename.
    How to write correctly? Thanks.

    Avatar of Roger Coathup
    Roger Coathup
    Participant

    @rogercoathup

    Have a look at this page:

    http://codex.wordpress.org/Function_Reference/bloginfo

    you want bloginfo(‘stylesheet_directory’) instead of TEMPLATEPATH

    Avatar of youlichika
    youlichika
    Member

    @youlichika

    Hello, I find the method.
    Use STYLESHEETPATH replace TEMPLATEPATH.
    Ho…la…

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.