[resolved] How to link to a custom php page in theme? not a template (3 posts)

  1. moto_485
    Posted 2 years ago #

    Hi I was wondering how to create a link to a php page.

    Say I was on a page where I had filled out a form selected a service or two and passed that information to another php page before sending that info to paypal.

    How do I refer/link to that other page such as <?php bloginfo('template_url'); ?>/checkout.php which does not work I get "Fatal error: Call to undefined function get_header() in C:\"

    Just starting to learn wordpress and not sure how to do this.


  2. Hakkim P Ahammed
    Posted 2 years ago #

    Try creating the checkout.php file as page template and assign it to a page checkout (create new one). Then put that page's link in the form action. Steps here

    1. Create a new page called checkout
    2. Make checkout.php a page tempalte, see Custom Page Template section on this page.
    3. Assign this template to the above page ans save it.
    4. Give this page link in your form action.


  3. moto_485
    Posted 2 years ago #

    That works, I just had in my head that the template was just that a template and didn't even consider it, thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.