Let me start off by saying that while I have backend programming experience, I am a novice to Wordpress and PHP.
I am trying to add PHP code to a single page. I thought this would be a common paradigm, but I can't seem to find a direct answer for it. From my research I found two general ways that this may be possible (ignoring adding plugins).
- Write a custom plugin.
- Use a child theme.
However, I would like for a few things to be true.
- HTML is modifiable from the Wordpress GUI.
- Be able to access elements of the HTML from the PHP code.
- PHP code only runs on the single page.
- Inherit the current theme/CSS (this isn't as important).
I think the major problem that I face occurs when a template file is used. When I do this, I seem to need to directly code the HTML in. Is there a standard approach to make all of these conditions true? Or if not, is there any way to do it?
Any help is greatly appreciated.