Creating a WordPress Page using PHP code (5 posts)

  1. Joeynoh
    Posted 6 years ago #


    I have created a page that people can use to sign up to become part of my blog with their own custom page. The form values will be put in a database and pulled again on a custom page that would be created for them. I want that page to be created automatically, but i dont want it to be just a file, but rather an actual WordPress page.

    So would anyone know if that is possible? If so what would the php code for that be?

    And for my 2nd question; I want to place a custon php file in my theme directory, but of course when i go to mydomain.com/mypage.php i get a 404 error. So my question would be is what am i supposed to include on my page? or how can i make it as much of a part of the theme as lets say the page.php.

    Thanks in advance,

  2. Samuel B

    Posted 6 years ago #

  3. Joeynoh
    Posted 6 years ago #

    Yes, I know how to create my own template. But Want I want to know is how to create a custom wordpress page with PHP Code. The same way as how i would create one in the control panel and click on publish.

  4. Samuel B

    Posted 6 years ago #

    create the page template - upload it
    choose that template from the template drop down when writing a page
    you have a custom wordpress page then

  5. Joeynoh
    Posted 6 years ago #

    Yes, i know.. As I have mentioned before, but maybe i should have been more clear. I want the PHP code to create the page, not me. A button that is clicked on my custom page, will create (on its own, through code) a wordpress page with the given parameters.

    So no one would have to login into the control panel for this.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.