I have no idea why this should solve the issue but I can solve it. Use a different file name. For example: include('my_widgets.php');
I get the error you describe with include('widgets.php');
but not with a different file name. I don’t know why. I do know that WordPress has a Core file named widgets.php
but I can’t work out why there should be a conflict. It must have to do with the way that include
crawls for files but I’d have to do some research– get under the hood, so to speak. Moral of the story: Don’t use generic file names 🙂
Related Posts:
- How to enable edit button in the theme’s customize UI?
- Disable Specific Widgets on Selected Pages of a WordPress Website?
- Themes VS Plugins [duplicate]
- Conditional Display of Links in Widgets
- Created Widget Not Showing up on Admin Panel
- Setting up widgets in wordpress with a unique ID for the after_title argument
- I need some direction on how to have a sidebar based on meta rather than page
- I have no idea “How change font for elements in widget?”
- Do widget options need to be escaped widget()?
- In the archive widget, how do I sort in between two years?
- Setup page on first login on multisite
- Best practice for including plugin output in a template without using shortcode?
- Custom widget doesn’t save values from dropdown box
- Widget where it can make changes to the container
- Widget display in theme
- Customize a widget position
- What can I do to customize a widget provided with this plugin? from where have I to start?
- What Features would you Most Like to See Added to WordPress? [closed]
- is_plugin_active function doesn’t exist
- Proper Way to Modify Plugin
- How to edit a wordpress plugin without break its update process
- Looking for a Table of Contents (TOC) plugin for WordPress
- WordPress Plugin Development In MVC Architecture, How?
- How To Determine If A Filter Is Called In A Sidebar/Widget Context?
- Where should I use get_option in a plugin
- GPL and plugins
- How can I make my custom shortcode work in a Custom HTML Widget?
- Create page when plugin is activated
- How to show custom message once on plugin activation?
- Post source link plugin – small modification
- How to add users roles dropdown in registration in wordpress
- wp_schedule_event / cron_schedules – custom recurrence time not working in Plugin
- How to load a new template page according to a particular URL?
- Failed to invoke other hook from the init hook
- Changing widget options via the functions.php when there are no hooks
- Multiple plugins using the same OAuth class issues
- How do I future proof my older WordPress theme?
- How to get Plugin Slugs?
- Advanced Integration – WordPress + YOURLS
- Replace existing pages with new pages, keep menu links
- clean wp_options table unused rows
- Modifying Footnote Plugin for Descriptive Title Attributes
- Delete Associated Media Upon Page / Post Deletion
- How to use get_theme_mod in gutenberg editor wordpress?
- Get post values of form created by widget in sidebar
- Disable woocommerce cookies and delete cart data automatically
- changes to widget settings not showing up in individual pages pages until they’re updated [closed]
- Calling an attribute from a plugin shortcode
- Why can’t I access my Intranet LDAPS with NADI?
- Add content to footer – above wp_footer
- Redirect to another page using contact form 7? [closed]
- Login Customizer doesn’t change the background of the register form
- Integrating WP E-commerce plugin into custom theme
- Custom post types – remove default post supports through empty array?
- Repeated Output in Widget
- WordPress Apply filter in plugin causes 500 internal error
- When I try to de-activate any plugin it gives error “Warning: call_user_func_array() [function.call-user-func-array]”
- Creating a widget and missing jQuery
- WordPress – source link plugin – how to modify it?
- How to create plugin in wordpress [closed]
- Plugin showing error
- I want to filter my products with attributes [closed]
- Action on WordPress Install
- Delete data from custom table when deleting a post
- Accessing widget information
- What is the best way to make a custom page from a plugin?
- Setting text widget to one page only
- How to add captcha to publish widget
- Listing all sidebars
- Automatic recurring payment using YITH subscription and Dokan Stripe
- How to customize maintenance mode notification in wordpress?
- How to keep plugin (media-sync) running even the tab is closed?
- Widgets are not displaying in the admin panel
- Hide fields in woocommerce settings
- implement custom roles in custom plugin
- Can I add Short Code Of A Plugin In The Code Editor of WordPress?
- Adding custom post category to categories widget
- Adding LOAD MORE on a page
- Custom Plugin: How to Include Install Buttons of other 3rd Party Plugins?
- Update widget values from ajax function
- The styles in the recent posts widgets plugin not working
- How to disable a widget area of a specific page?
- Cron job shedules replace?
- Customize plugin templates
- How to use custom footer template in a site-plugin?
- Hook on widget context plugin to add custom context for widget
- Why the output of an image gallery plugin is not displayed into a page of my custom theme?
- Adding link on title its in description but not in title see screenshots attached
- How know the “admin” blog from wordpress multisite?
- How can I retrieve data within my widget
- wp_query for more fields plugin
- conditional tags for the output of a plugin
- Pronamic Info Window
- Scrolling Ads? Live scrolling widget, not random on refresh
- From a legal perspective, is it okay to customize a plugin’s code?
- Child Plugin Admin Panel
- Does anyone have the Custom Post Permalinks plugin from John P. Bloch? [closed]
- Create Custom Coupon Type
- Am having issues intergrating this api into my wordpress site, any help please?
- Using ACF to allow user to add and edit multiple saved forms