You start the PHP code with short tags <?.
If it is on a server with short tags disabled, the PHP code is not rendered and is outputted.
Then it’s better to use complete tags <?php.
Related Posts:
- No Error Log File, no debug info
- How should one implement add_settings_error on custom menu pages?
- Prevent notice and warnings in error_reporting?
- How to log plugin errors to plugin error_log file
- Catch own Exceptions
- Throw 403 in a plugin [duplicate]
- why don’t I get error messages in admin when developing?
- WP_Error handles errors, but how can I show success with a message?
- Settings API – Undefined Index when unchecking checkbox
- Error : “Updating failed: The response is not a valid JSON response” with custom shortcode
- How can I display an error message after post has been saved?
- Execution limit and Memory limit errors even i changed to 1024M and 600(cache.php,load.php)?
- Proper way to pass credentials in a custom login form to avoid “headers already sent”
- Two functions utilizing registration_errors filter
- How can I gracefully escape an error condition?
- WordPress debug messages not displaying
- Custom Post Type Object – Undefined Variables
- Reporting errors in a shortcode plugin
- What might be the reason of Couldn’t fetch mysqli_result on another domain?
- Plugin can’t be activated [closed]
- How do I debug an error that a plugin is causing?
- Need Help Determining Where Header Error is Happening
- “Rendering of admin template [path to template] failed”
- Is there any way to pass messages from a script to a redirect target in a hidden fashion?
- Import images remotly run through timeout error
- Error code when migrate
- WPGut – Updating failed and shortcode?
- GET request return value as error instead of success
- WP_Fatal_Error_Handler OR WP_Error OR try/catch
- Custom Plugin activation error in Multisite
- Warning: Illegal string offset – on homepage
- Not able to Update database while creating a custom module
- Plugin error on activation – breaks page encoding and prints the code of plugin php files
- Getting error of unexpected output during activation
- Should I use wpdb prepare?
- Is there a limit on making calls to WordPress.org API’s?
- Vagrant script to setup all the common PHP / WordPress version combinations
- Add Dividers or Separators Between Nav Menu Items
- Overide get_template_part( ‘partials/post’, ‘sidebar’ ); with a plugin
- Change Media Uploader default directory
- How to make method from plugin available in theme?
- Load visual editor without custom styling
- Can i do plugin commits directly from a plugin folder inside an installation using the Trunk SVN
- Turn Shortcode Gallery into Carousel in WordPress 4.4
- Using a Theme inside a Plugin directory
- register_activation_hook() not activate plugin
- Problem with sorting entries in a plugin’s admin interface table
- Multiple textdomains
- How to prevent specific plugin files or subfolders from appearing under “plugin files” listing
- How to create custom home page via plugin?
- Dynamically Override Fancy Title
- Use a PHP file as action for a form in a WordPress plugin, what’s the correct way?
- Featured Image not showing in admin
- Set a specific page as 404 – not found via my own plugin
- Adding Automatically To In WordPress Using Filter Referencing?
- Activation hook not creating table
- wpColorPicker is not a function!
- How to display non-page / post content
- Mixing Regular Javascript With jQuery in a Plugin
- Best plugin for most viewed post [closed]
- What could cause my plugin’s options/settings page not to load?
- Plugin Upgrade Strategy
- Which are the hooks run before/after when a category’s deletion?
- Disable The Events Calendar plugin from loading its scripts
- get_the_excerpt() not working in plugin loop
- How to remove images from my plugin page in WP Directory?
- Is there an additional block.json property to set to get an InnerBlocks child to respect the “supports” property?
- Plugin with action ‘save_post’ needs to press publish twice on order to publish
- How to prevent UNDO on guternberg block editor
- How can I get the selected string when using a toolbar button in Gutenberg?
- woocommerce_checkout_order_processed hook executing function twice
- How to analyze wordpress plugin performance
- how to use shortinit in wordpress
- White screen when activating plugin that sends form via WordPress
- dbDelta SQL Query Not Working
- wp_localize_script is not adding a global variable for javascript
- A question about add_action()
- How to display the categories on page using shortcode?
- add_action pre_term_description vs. pre_category_description
- How to Get Rid of Unwanted Backslashes in WordPress Form Input inside admin menu option
- How to Customize Polylang Language Items
- Enqueue scripts inside a class in a plugin
- Create a Plugin to Download Files from Web to Server
- WP plugin repository didn’t parse readme.txt correctly
- Allow REST API Endpoint to specific user and hide from public
- Adding a dropdown on the user admin
- Check current URL is 404 in pre_option_stylesheet filter hook
- I’m including a html file in my plugin, but it can’t find its css or js files
- How to show content in the body with my plugin (only in frontend not backend)?
- Problem in plugin debuging in wordpress
- How to include files in the loop via ajax
- mutiple shortcode instance on the same page
- How do I create a state of “don’t assign anything to variable” if WP_Error throws an error?
- Some data has already been output, can’t send PDF file – fpdf issue in WordPress
- Can i use one wp plugin inside other?
- Plugin or Custom Page Type
- Login using /wp-admin doesn’t redirect back to /wp-admin
- What do “and” means infront of a variable? [closed]
- Dropdown pages in Settings API
- Fatal error: Call to a member function query() on a non-object 3.6.1