Recommended use of PHP in pages
-
I am a new WordPress user, and want to use it as a CMS. Most of my pages are static, and I can see how to do that. I have some that require PHP logic, DB access, etc. From my reading so far I see 2 ways to create pages with logic. I wonder if WordPress has a recommended or preferred way:
1. Create my own page template for specific pages; codex documents how to do that. The only thing I don’t like about this is if I switch templates, or update template, my page template might not work anymore.
2. Write a plugin that looks for a shortcode on a page, and returns the web code to appear on the page. I like this way, but have not seen any discussion as to whether this is suggested, or has a downside.
Thanks for any guidance on this.
- The topic ‘Recommended use of PHP in pages’ is closed to new replies.