What is BOM?
The UTF-8 byte order mark or simply UTF-8 BOM is a series of bytes that helps the reader to understand the encoding of the current document.
These 3 bytes are:
EF BB BF
Or simply the Unicode character : U+FEFF
In a plugin file encoded as BOM, these bytes will be output when the template is called, causing early output in header, that triggers a common error:
The plugin generated X characters of unexpected output during
activation.
This can also happen to theme’s files. Since using BOM for UTF-8 files is not recommended by Unicode Standards, you can save your templates as UTF-8 without BOM.
You will also notice that every UTF-8 file that is encoded under BOM has at least a size of 3 bytes, even if it’s empty.
Related Posts:
- Conditionally enqueue a widget’s script/stylesheet in HEAD (only when present on page!)
- Adding a widget programmatically
- Delete Custom Dashboard Widgets
- How to pass JavaScript variable to PHP in wordpress widget?
- Is dynamic forms/entries possible in Widget?
- How To Add an Extra Field in All WordPress Available Widgets?
- Using the media uploader in a custom plugin
- Has anyone been able to get the aweber plugin to work
- How to create a widget or plugin to add custom content to my website?
- WordPress widget / plugin….fields not appearing in my widget
- Custom Widget outputs the input but doesn’t save anything inside the textarea
- How can I retrieve data within my widget
- How to Get Admin Settings for a widget when using the_widget() with custom widget
- How to unregister a widget from a child theme
- WordPress multiple widget in single plugin
- Setting up widgets in wordpress with a unique ID for the after_title argument
- How to exclude a widget from page 1 of a paginated post
- how can i limit the number of instances for my widget
- Dashboard Widget Form
- I need some direction on how to have a sidebar based on meta rather than page
- How can I reuse the WordPress search form for a custom plugin / widget?
- Admin Dashboard with Custom Tab for Client
- Passing $this->get_field_name() to javascript
- Is there plugin to show recent posts from one website in the widget area of another?
- Can I use a form in a dashboard widget?
- Missing argument 3 for wp_register_sidebar_widget()
- The called constructor method for WP_Widget in GFWidget is deprecated since version 4.3.0! Use
- I wrote my plugin. How to display the result of the plugin’s function to sidebar (widget?)?
- How to check if you are on widget.php page?
- How to save additional user data as part of the registration process?
- Theme’s default styles are overriding my plugin’s custom CSS
- Adding widgets to header and footer from plugin
- Archive – same title for the first two posts
- Rotate Widgets or Content Blocks every x sec/min
- Do widget options need to be escaped widget()?
- Ajax contact form widget plugin data not insert in database
- How to remove traces from widget during uninstallation
- Which widget to use for display category post with view more? [closed]
- WordPress Widget Not Saving Data
- In the archive widget, how do I sort in between two years?
- Wysiwyg editor errors
- How to make WordPress customizable for clients
- How to get my plug-in, wrote in php, to refresh on its own every 5 minutes?
- Conditional tag in Widget Logic for checking if top level page or if subpage
- Char limit on custom blog-post form? [closed]
- How do I use wp_editor() in widget form?
- How to reorder and display a feed to be chronological?
- How to add Wrapper Div/container element around WordPress Widget Content
- Disabling plugin but wpenqueue is not available
- Related posts widget or plugin needed
- Problem since update 3.5 [duplicate]
- How to disable a widget when dependent plugin is inactive?
- Best practice for including plugin output in a template without using shortcode?
- How can I delete a wordpress widget instance?
- Add Shortcode tag in Widget/Sidebar
- How to create wordpress widget that is fixed position on the home page
- Saving widget options from class method
- How to handle forms from sidebar widgets – Processing $_POST variables using get_field_name()
- Short messages widget [closed]
- My widget won’t update its values when save is clicked
- How to display a widget on a page with no theme?
- Widget where it can make changes to the container
- Widget content turns up before title
- Extend a plugin to include a widget option
- Is there a Image Gallery which will load all my posted Images like twitter’s image grid?
- Modify pages widget and make a plugin?
- wp_footer hook running twice
- Is there any plugin to show number of clicks on the link?
- Table of contents (TOC) plugin is not showing header tag
- co-authors plugin – inline listing
- How can I display selected content from a seperate database in an Activity style widget?
- RSS Feed on WordPress showing code (hypertext) in articles titles
- Change language in SiteOrigin Widgets
- Some Widgets in the Right Side Bar and the whole Footer section is not working in a WordPress Site
- Using foreach loop for `$instance` of form and update array widget iteration
- Shortcode generated widget to appear on same line as heading text and button
- How do I keep children of certain parent menus expanded by default on a sidebar?
- Registered sidebar area is not shown from plugin.
- Widget logic using woocommerce product category
- Using slightly modified widget
- How to display widget in front end?
- Using Widget Logic to place menu on multiple pages?
- Plugin Works, but Widget Doesn’t
- Widget Script Loads at Bottom of Page
- Use of apply_filter in plugin/widget class
- jquery conflict with widget page
- Plugin: Unable to Save the Image Alignment Option to Display in the Widget in the Sidebar
- Template from scratch: Sidebars not showing widget
- Widget redirecting to home page
- How to use template field in the Event Organiser plugin widget
- How to develop an extension for a simple form post and post back? [closed]
- How to add homepage Widget?
- What can I do to customize a widget provided with this plugin? from where have I to start?
- Content expands beyond its column container [closed]
- Am having issues intergrating this api into my wordpress site, any help please?
- How can I add a zip code service availability checker in WordPress without Woocommerce? [closed]
- Use custom Javascript for a custom Elementor Widget [closed]
- Hide attributes based on previous selection
- WordPress child theme widget customization – Eduma
- Widget saving but showing “waiting” animation [closed]