Well, the error says exactly what’s going on.
You’re outputting content, before the data is finished being manipulated. It’s like you’re trying to echo something but WordPress still has to do some stuff and it’s telling you “No, no, let me do my thing first”. You’re calling the echo too early.
In short, you’re 99% outputting before wp_head
.
So, go to header.php
and after the body
div, put your
WPCFSSearchForm::show_form($preset,"preset-$id");
Or
require_once preset-display.php
Should work.
Thing is, this is really bad to do, so I suggest hooking show_form
to an action and outputting it anywhere you want.
Related Posts:
- Illegal string offset Warning PHP
- Error Warning: Declaration of description_walker::start_el after PHP upgrade [duplicate]
- “Warning: count()” error on php 7.2
- PHP contact form returns warning in text widget [closed]
- Warning: array_pop() expects parameter 1 to be array, boolean given
- Get rid of this Strict Standards warning [closed]
- Illegal string offset in PHP function
- Warning message (re. php) on the blog page
- How to fix this warning:call_user_func_array() expects exactly 2 parameters, 1 given in D:\wamp\www\…….\wp-includes\class-wp-hook.php on line 286
- Error while setting role
- How to fix this PHP warning in WP-Admin after upgrading to 3.1.2?
- I am receiving a pluggable.php warning sign on my only http:// page
- class ‘wphpc_PAnD’ not found
- PHP Warning: Missing argument 2
- Cannot modify header information – server cache
- PHP warning – Use of undefined constant ‘FORCE_SSL_LOGIN’ ‘FORCE_SSL_ADMIN’ on wp-config.php
- PHP warning with code for nav menu walker [duplicate]
- Warning: preg_replace(): Compilation failed: unknown option bit(s) set at offset -1
- Warning: Illegal string offset ‘post’ and ‘page’
- Trying to add taxonomy terms to search results page
- How do I use WP_query with multiple post IDs?
- esc_attr() right way and use
- Get meta_id along with meta_key and meta_value
- Show content if parent page has children
- Detection of theme being used
- Where to include php files in wordpress and how to refer to them later [closed]
- WooCommerce: How to display item meta data in email confirmation using woocommerce_order_item_meta_end
- How to order posts by modified date without using ‘query_posts’?
- How to add a featured image to a existing post via php?
- Get widget settings function?
- wp_handle_upload_prefilter valid date from input file
- Mysterious HTTP 404 header in my own scripts
- Archive dropdown styling not applied
- Browser title script ignoring is_page /else conditional [closed]
- How to make custom total price reactive in navigation
- Adding tawk.to code just before body tag on functions.php file
- Custom php page outside the scope of my theme
- How to get 2 or multiple custom post types in wordpress functions.php
- Interrupting $html.= ‘ for IF statement
- Implement toggle switch for theme options in settings API
- Show comments menu in dashboard only if the site has comment
- WP nonce invalid
- Creating a Multi-Level Associative Object Using AJAX
- Create WP_Query to search for posts by their categories or their parent/child categories
- add_action shortcut?
- My custom wp-admin php files stopped working
- Get page that displays all children of taxonomy parent
- WordPress default Search function inconsistent in WooCommerce Product Titles
- How WordPress reacts to a lack of memory of the server [closed]
- Function to capture a value and store it in a variable
- PhantomJS with wordpress
- My new button is in the wrong place
- Checking array against author id in loop
- Call to undefined method – Download Monitor
- Why does abstracting html from plugin code result in loss of access to wordpress functions?
- Show a different code on front page to other pages
- Admin ToolBar not being displayed at top of site
- Undefined method class::construct() when creating a plugin
- Why are the details of my todo not saving?
- Theme activation hook in php class
- How do I get an external php page to load using javascript
- Redirecting to a custom forgot password page
- How to pass current loop data into nested loop
- How can I display Custom Post type Custom Columns and its Content in a Dashboard Widget?
- Proper way to use WordPress function with AJAX PHP file
- Custom navigation menu with awsAccordion
- Taxonomy term count
- phpMyAdmin error #1062 – Duplicate entry ‘1’ for key ‘PRIMARY’
- Replacing WordPress Icons (menu,icons32, etc)?
- How to restrict shipping zone in a specific interval time
- Can/should we delete wordpress cron jobs with no action?
- Accessing an instanciated class
- Hide A Class and Add Custom HTML Code Using WordPress
- Rewrite rule don’t work in wordpress on xamp
- Flushing the slug base has no effect and does not change
- Resize post thumbnail
- reset data of an array
- product_type_options get saved value [closed]
- How to create a widget with a populated dropdown?
- Get user by meta data key and velue
- Add another role to a user when they click a button?
- Unable to pass arguments to function used in add_action
- How to limit functionality of a woocommerce plugin to only certain user role?
- Allow user to select location and then set cookie for location in WordPress
- Use PHP code in Menu Admin Section
- Front page not loading after updating PHP version (ec2)
- Querying posts based off a jquery datepicker
- set new link as permalink
- Repeatable field within repeatable group of fields
- How to get WordPress Adminmenu items?
- Adding Media button to only pages
- Adding php within a return statement [closed]
- Display post of specific category on page
- Adding multiple emails to a
- Null value given when confirming email’s
- Predefine Magazine Style Layouts
- Cannot install plugins or themes on new WordPress installation at Cloudways
- Custom WP LIST Table filter
- How to run site locally after downloading database
- How to change shipping method title based on cart amount?