Inserting custom PHP code into a certain WordPress page
17,411
Could you not create a custom template for the page?
Author by
Pieter
Updated on September 11, 2022Comments
-
Pieter over 1 year
I'm in the process of integrating certain functionality into a WordPress site. I'm looking for a way to get this feature to work within a WordPress environment. (It's basically a page that lets users search certain things in a database.)
The site's current CMS allows me to insert custom PHP code into a page, so I wanna know if it's possible to insert PHP code into WordPress pages. Or would you recommend a different approach, perhaps?
-
Pieter over 13 yearsI'm not sure. The web page has to fit into the regular page hierarchy, so I don't think it's possible.
-
Pieter over 13 yearsWait, you're right! davidrisley.com/how-to-custom-page-template-wordpress Thanks!
-
Martin Bean over 13 yearsNo problem. I should have been more specific and said custom page template. You should be able to then select the template's name from a drop-down list in WP-Admin when you create a new page.
-
Pieter over 13 yearsI have implemented it and it works way better than I imagined. I love WordPress.