What I would like to do is have a html form that I will place at the end of most of my pages. I am not planning to have it on every page, but most.
Edit: I realized after posting that I didn’t make it clear enough that I don’t mean in the footer, but something I would like to add on the page itself.
Of course I could simply copy in the full html and css code at the bottom of the pages I want it on. However I know there is a better and cleaner way to have my html form and css in one file and then either through making a plugin, use of short code, html code or some other option I’m not aware of, import the html code into the page.
So what would be a good approach to accomplish this?
Thanks for any help.
A simple way to do this would be to create a custom page template that includes the form and just select that template when you need it.
This approach would not work well if you’re already utilizing more than one page template. See @Hakem’s answer if that is the case.
Custom Fields could help? this is the fastest way i could think of. Alternatively you could use shortcodes
edit page.php file and add the following in the loop:
Then go to the pages you want to add the form to, and add a custom field “add_custom_form” with any value.