PHP is filtered out of the WordPress post editor as a security feature. There are some plugins that let you put them in, but I think they’re a pretty bad idea, so I won’t even link to them.
If you need PHP on a page, you should be putting that code in a template file or in functions.php or a plugin file that hooks to a page you want to modify.
Related Posts:
- How to return number of found rows from SELECT query
- Allow Editors to edit pending posts but not draft ones
- Check php version before theme activation
- How Attackers write script into my php files?
- WP API V2 returning Invalid User ID
- Why does $_SESSION only work when I am logged in?
- How to make an meta_query optional?
- How to show only parents subpages of current page item in vertical menu?
- How to use copy() function and paste file in /wp-content/themes directory
- PHP calling AJAX function that relies on passed PHP function values not working
- Sanitize get_query_var() url parameters
- I think emoji are killing my WordPress site… How can I debug?
- WordPress Ajax Data problem
- Remove all nav menu classes ( but keep useful ones… )
- Hiding a php element from mobile browsers
- How to safely remove the footer (twentytwenty)
- ajax_object is not defined when ajax calls the function
- How do I fetch all comments per post via WP REST API?
- When using the_author hook, how can I determine the PHP file that generates each call to `the_author()`?
- wp_insert_post not working
- Add htaccess rules with insert_with_markers at beginning of htaccess
- Add a custom stylesheet for BlackBerry
- Custom theme: Alternatives to long list of ‘include’ in functions.php
- Reordering Buddy Press profile navigation [closed]
- Why my filterable portfolio page work not perfectly between slug button and slug output WORDRPESS?
- PHP variable = get_the_post_thumbnail_url outputting without slashes
- Automatically adding new post categories to menu
- MetaBox body is not showing (the callback function)
- WordPress every page is 404 not found including admin resources
- How to make products with no cost in WooCommerce
- Pass php dynamic variable to shortcode
- Insert term and child term from frontend
- Do wordpress create a new file for each new post?
- Catchable fatal error on 3.6 update
- AJAX – Returning Two JSON Objects with One PHP Function
- How to show a users bio on a page
- Add Ajax Hooks and Call from Custom Template PHP
- Why in my theme I can’t see all the statics content under the posts?
- Display all pages – in order
- Backend of the WordPress.com [closed]
- Get Page ID from Backend
- PHP in Edit Post link
- How to make jquery count down timer function manually editable
- Hierarchical taxonomy list with modificated term links
- What’s a good way to allow overwriting files within a child theme if I want the same folder structure?
- Double Curly Brackets in Php
- WordPress filter load_textdomain_mofile not working inside a child theme’s functions.php but works form inside a plugin
- How to unlink all posts from tracking same amount of views
- Redirect a WP created page to a manually created PHP file inside theme folder
- How to hide posts of a specific custom category in WordPress?
- Output category list inside array
- Have Woocommerce show product price if id, when not logged in
- Composer setup-config.php not found
- Problems clearing cache
- How to make a conditional statement within $output in shortcodes.php?
- Extend Menu Walker Output
- How to debug failed changes to posts?
- how to add a div inside wp_page_menu
- Add “alt” Attribute to GD Star Rating Tags
- calling admin-ajax.php from admin-ajax.php
- Use of antispambot with $curauth->email
- Add a suffix to the image in the_content()
- Fatal error login WordPress [duplicate]
- Pagination contents not changing in Front page WordPress
- add role on WordPress in PHP on a second database
- How to select post ID for given parent name with nested prepared queries?
- Enqueue assets from multiple directories using add_action/do_action
- Can I disable auto increment of WordPress Posts Database to utilize previously deleted records?
- Changing Date Format on Custom Meta Data w/shortcode call
- How to apply ‘add two more posts’ to media content?
- How to disable sub menu items from being created?
- Access to “My Site” is missing from the admin bar
- Unable to insert current username into custom table through html form
- add ‘publish metabox’ to Gravity forms edit page/form area
- How to redirect (301) trashed post to it’s parent taxonomy TERM ARCHIVE instead of 404 page
- A WordPress Page to display custom database query results
- style.min.css code issue
- How do I modify the Previous and Next Page posts on blog pages to include “previous” and “next” before the links?
- How can i iterate through this shortcode array?
- How do I prevent a folder from reappearing in my home directory?
- How to detect and make links nofollow in author description
- Making my own admin panel for WordPress
- Styling admin page rows in order of importance (checkboxes)
- On selecting shortcode generate selected shortcode table inside page editor worrdpress
- WordPress plugin creating sidebar on the theme/page
- Change taxonomy for categories
- Accessing Variables Used In a Plugin Using PHPStorm + XDebug
- Pagenav Not appearing on custom Template
- How To Customize Position of »add to cart« of WooCommerce on Product Page [closed]
- Display wordpress post to static website in the footer
- How to echo a different field if another field is empty?
- Remove the_content From Loop
- PHP Puzzle: Unique Styles with PHP loop
- My title is showing after the shortcode
- Display Sale Price Before Regular Price (WooCommerce)
- Load a Header in wordpress
- Adding multiple conditional tags in a function?
- Using is home to get content [closed]
- Pull latest Youtube Video from json url and make new post
- PHP $_SESSION array – only showing current index