Title: Create custom PHP Page
Last modified: August 7, 2020

---

# Create custom PHP Page

 *  Resolved [encrypt](https://wordpress.org/support/users/encrypt/)
 * (@encrypt)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/create-custom-php-page/)
 * Hello,
 * I am hoping you can help (and secretly hoping it’s a fairly easy task)
 * I am looking to create a custom php page which will do some processing.
    This
   page would be accessed from the main GP/WP site using JS in Hooks.
 * I tried using hooks and headers for the PHP within ‘elements’ however it appears
   that all of the available options only process the php after some headers have
   started being generated, therefore meaning that the php would not present data
   as accurately as expected.
 * **Example php (simplified);**
    `<?php echo 'success'; exit(); ?>`
 * Therefore I want the page to be as plain as possible OR to be able to execute
   the php early enough that the `exit();` stops the actual page from being rendered
   into HTML (headers, etc.)
 * I have tried to use the “disable elements” for this page when editing however
   this doesn’t seem to do enough.
 * I am running multi-site and cannot be sure a directory on my physical server 
   where I could place this file, in order to access it from the front-end.
 * Please could you help me to find a solution?
 * Many Thanks!

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

 *  Theme Author [Tom](https://wordpress.org/support/users/edge22/)
 * (@edge22)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/create-custom-php-page/#post-13223798)
 * Hi there,
 * Something like this is likely quite complex and out of the scope of our free 
   support, unfortunately.
 * You may want to share the code you’ve built so far over on a site like this: 
   [https://wordpress.stackexchange.com/](https://wordpress.stackexchange.com/)
 * That site is great for general WordPress coding help.
 * Thanks!
 *  Thread Starter [encrypt](https://wordpress.org/support/users/encrypt/)
 * (@encrypt)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/create-custom-php-page/#post-13224564)
 * Hi Tom,
 * Thanks for your reply.
 * Is it worth me posting this to the premium support team?
    Or do you think I should
   just go straight to the stack?
 *  [Leo](https://wordpress.org/support/users/leohsiang/)
 * (@leohsiang)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/create-custom-php-page/#post-13224583)
 * Stack would definitely be your best bet as it’s not a theme related question 
   🙂

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

The topic ‘Create custom PHP Page’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/generatepress/3.6.1/screenshot.
   png)
 * GeneratePress
 * [Support Threads](https://wordpress.org/support/theme/generatepress/)
 * [Active Topics](https://wordpress.org/support/theme/generatepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/generatepress/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/generatepress/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * 3 replies
 * 3 participants
 * Last reply from: [Leo](https://wordpress.org/support/users/leohsiang/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/create-custom-php-page/#post-13224583)
 * Status: resolved