Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

is it possible to set one URL prefix to include one PHP page every time? Only Wordpress header and this PHP page. I need to include some custom application but HAVE TO include wordpress powered web-design.

For example - http://my.web.com/customapp/ is a prefix and

http://my.web.com/customapp/
http://my.web.com/customapp/some/function1
http://my.web.com/customapp/some/function2/x/y

points to one PHP page included in Wordpress theme-page.

Thanks.

share|improve this question
    
Did you look into creating a Template for this site? Here you can find a ressource on the codex –  fischi Feb 26 '13 at 22:11
add comment

1 Answer

up vote 0 down vote accepted

Try get_template_part().

For example, in your index.php template file:

/**
 * Index template file
 */

/**
 * Include header
 */
get_header();

/**
 * Include arbitrary file
 */
get_template_part( 'foobar' );

This will include a template-part file, foobar.php, located in the Theme's root directory.

share|improve this answer
    
Where is this file located, please? I don't know Wordpress very well. Is it possible to use this and show own title of page in title bar? –  Xdg Feb 26 '13 at 20:38
    
Where is what file located? Please make your question more descriptive, if you want more precise answers. –  Chip Bennett Feb 26 '13 at 20:45
    
I'm sorry. 1) The file you mentioned - index.php - is located in \wp-content\themes\my-theme\index.php, right? 2) Is it possible to set own title of the page (in title bar)? –  Xdg Feb 26 '13 at 20:49
    
First question: yes. Theme template files go in wp-content/themes/{theme-name}. Your second question is entirely unrelated. –  Chip Bennett Feb 26 '13 at 20:59
    
I'm playing with wordpress and it looks like index.php is included only sometimes. I need to include some application under wordpress so I need load application's loader file, change page title and not to trigger 404 page not found error. –  Xdg Feb 26 '13 at 21:09
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.