PHP (unlike HTML) is not meant to be used as content markup language. It is server–side language with too much access. It is very challenging to safely and securely treat PHP as part of content.
For basic example — what if one of your authors writes PHP code in a post which amounts to “make me site’s administrator”?
While WP plugins implementing this do exist, this is almost never good idea, especially at multi–author site.
The typical way of handling more elaborate content in WordPress is via custom fields / meta boxes (/frameworks for both), although it usually falls farther away from WYSIWYG.
Related Posts:
- Is there any way to use get_template_part() with folders?
- Is it possible to override the result of get_template_part()?
- Get template part vs locate template function
- Templates & CSS – Proper Programming Practice?
- TwentyTen: Overloading template.php files vs. get_template_part
- Passing variables to template parts
- How to move style from template file to section?
- Unable to include a template
- Where is the template for the ‘standard’ format of a post in the theme twentythirteen?
- Valid HTML in Template Part
- Remove portion of header code from home page only
- Use a separate template for the home page only
- How to create new template page and template-parts in wordpress theme [closed]
- Including template pages within another template?
- Organize template parts and page templates in folders in regards of template hierarchy
- How to get all template files used for rendering a single post/page?
- get_template_part for template in subdirectory not working
- Display a custom 404 page without a redirect
- How can I show contents of a template part inside of another page?
- When to use content-pagename.php?
- WordPress “Blog” template hierarchy
- How to use Class
in Java? - How to edit contents of dynamic_sidebar()?
- Loading partial templates with AJAX/PJAX
- A special single page templates for posts under a category and all its child category
- Where to store some per-template preferences?
- How do I override template-tags.php in twentyseventeen theme
- passing argument to get_template_part() or a better way to code
- roots child theme can’t override header.php
- When calling wp_title(), do you have to create some kind of “title.php” file?
- Accessing $post variable from template part
- Stream Video Player does not work with do_shortcode()?
- How does wordpress blocks?
- Which has more impact on site performance? Template overrides or hooks
- Subpage template
- What should I put on my index.php?
- How To Create WooCommerce Custom Template For Specific Product?
- How to Use Twig + Timber with Multiple Loops based on Meta Key Value
- Programatically create a page
- How to custom page template for the Gutenberg editor
- Use PHP templates as blocks
- Directly using pure JWPlayer JS (but NOT WP Plugin)
- Login page theming?
- I want to add a custom “all posts by author” by authors name. How?
- Redirect template based on permalink rather than $wp_query
- displaying category and subject posts
- How to duplicate a page template but make minor changes to the header?
- Print shortcode in defined area
- Custom templates vs page-slug
- get_template_directory() still returning path to previous theme
- Footer.php not showing?
- How to publish a Page and Posts using single template
- lost css when overriding themes templates
- What is the best practice to style archive page 2,3,etc differently than archive.php?
- How to create a post template with two sidebars
- ACF costum date format [closed]
- != and !== both not always working? [closed]
- Page template for a site from network
- WordPress 3.3.1 single post template
- Conditional to determine if search.php page is the current template
- Prevent 404 and serve custom template for custom URL
- Page Templates not using functions.php
- Add stylesheet per layout
- Get template part with CPT and Custom Taxonomy conditionals
- use a custom page to display search results
- When a user registers, create a page from an existing template with their username as the page name
- Theme settings Page: Settings Api vs Update_Options
- How to add description over forum list on bbpress root page
- two active templates for one post
- Where is the code for “Front Page Template”?
- Help Understanding Template Hierarchy
- what is template-name.php
- templates with page teasers Or Featured Items
- If Child or Grandchild of Page
- Page template not registering on theme
- Is it possible to create custom links inside a template?
- How do I custom a page that doesn’t exist in the page list?
- Uncaught Error: Call to undefined function twentytwenty_the_post_meta()
- Timber + MtHaml, or any other HAML-like HTML shorthand
- small problem in the article ()
- Unable to access wordpress page
- How to configure my blog page
- BuddyPress : how can I call the template WordPress would have chosen (template hierarchy)?
- Archive only for /year/month, not terms
- Why default template does not show?
- Why does the blog page not take the page template selected?
- Custom Taxonomy Theme file not routing correctly
- Why would adding a template file to a child theme cause an error in template-loader.php?
- How can I add some blocks to template without changing template file?
- Creating a popup
- WordPress not picking up custom templates in sub directory
- Category template not displaying all post formats
- WordPress templates bug
- Taxonomy Parent not showing up in address bar
- wp e-commerce single-product template giving 404
- Strange Behavior of Page Template Dropdown
- WordPress Template works until page becomes a child
- WordPress -> PHPBB look a like
- How to limit block activity (insertion/deletion) to inside of a Block Template on the Admin Screen?
- get_template_parts() usage