Your script is at /wp-content/themes/responsive-child-theme/nowplaying-example.php
but you are including /nowplaying-example.php
. That is not going to work. You need to provide the complete path for that include:
include(get_stylesheet_directory().'/nowplaying-example.php');
Assuming I have read that right, and assuming that the files are actually there.
Your other code– the widget code– contains curly quotes. Don’t use those. Use ordinary, boring straight up and down quotes like in the first code you posted. That could be causing errors. But that other code also has a bad include. Those bad includes will trigger warnings, which could cause other issues.
Related Posts:
- How to include checkbox in widget backend form?
- Limit the number of inactive widgets
- Include WP_Query in my own PHP file?
- Include a external PHP file into a WordPress Custom Template
- Include files in functions.php
- load/require specific php files for specific pages/templates/post types
- How to get the registered sidebar’s name by its id?
- ob_get_clean returns empty string, ob_get_flush outputs string
- Transform php code into a widget?
- How do I create a drop down menu in a widget?
- WordPress widget in custom theme
- How to allow PHP In WordPress text widget
- Infinite-Scroll Plugin and Jetpack Infinite Scroll Plugin – Adding to “Thoughts” Theme
- Anything I can add to functions.php to make text widgets accept PHP?
- Show Specific Footer Widget for Specific Pages
- WordPress menu deletes when trying to add a hook
- PHP contact form returns warning in text widget [closed]
- How can I add a specific, custom widget to my theme’s header.php?
- Get widget settings function?
- Widgets not showing in my custom theme
- Class ‘WP_Widget’ not found
- Include Class File in WordPress
- integrating external php library into wordpress- the right way
- Can I change a variable in a content part while calling it?
- the_author() not working outside the loop
- Style every second widget?
- How to group 2 radio buttons in a widget?
- PHP Deprecated: WP_RSSjb has a deprecated constructor
- How do I use the Simple HTML DOM Parser in plugin when other plugin already uses it?
- Put CSS inside a PHP file and include it the right way
- custom widget on the footer
- Missing sidebar parameter “fix” – before_content
- How to add just one specific page to widget without plugin?
- Create onClick Event to Re-load a Widget
- functions.php is being included twice, creating PHP fatal errors
- How to put a variable in a instance in the widget
- Extending the WP_Widget_Text class
- Dynamic Sidebars & Echo
- WordPress Shortcodes.. printf is outputting a random number… Can’t figure out WHY?
- get widget number from array dynamically
- Hide subcategories (widget)
- Adding a widget function into the php theme file
- How to edit widget code to add unique class name to each div?
- If has $title in widgets
- Archives shortcode displaying above widget title
- Why does abstracting html from plugin code result in loss of access to wordpress functions?
- Widgets in the loop if active
- PHP include is only working in certain places in my custom WP theme
- How to make widget title accept php?
- What is the proper way to include a PHP framework into my theme?
- Hook called before text widget save
- php include not working in custom page
- What’s the best way to include PHP code in pages?
- Widgets not showing on custom theme
- My website is not showing Footer section
- WordPress widget and customize.php not working in Ubuntu16.04 VPS
- How can I display Custom Post type Custom Columns and its Content in a Dashboard Widget?
- How to use title attributes in sidebar widget?
- Show different website layout if no sidebar added
- Add a select-option to the default widgets
- How do I call an external php non WordPress class into functions.php?
- Some problems in custom widget
- How a HTML form can trigger a PHP function?
- Retrieve the whole widget sidebar and pass it inside an html
- How to stop hiding buttons forward / backward in pagination?
- How to create a widget with a populated dropdown?
- Before & After Content – After Content directly below Before Content when using require_once
- I need to edit a widget, with no dashboard access
- is_user_logged_in() not working in homepage
- Dynamic_sidebar load in string makeup
- Customizing the output of the archive and category widget without altering the original behavior of the widget
- How do I fetch a data from an external database into my wordpress homepage
- How do I fetch a data from an external database into my wordpress homepage
- Featured Products not showing up in “Featured” area of homepage
- (Who to follow) Twitter widget
- Widget Logic – display on page and all child
- Add disclaimer before certain posts and pages
- Widget Update problems using a for loop
- How can the searchform.php know if it’s used on a registered sidebar id ‘sidebar-1’ or ‘sidebar-2’?
- How to list categories by page id in wordpress
- PHP: Why does my code work in index.php but not a widget?
- Non-static method error when trying to use class in widgets
- Widget edit and add in any page
- Slider from different widgets
- Even with PHP plugin get_posts not working in widget area
- how to run a php code in widget?
- WP_Widget dynamic field array with external AJAX
- How do I / Is it possible to execute an external PHP file / function inside WordPress?
- List sibling pages widget, exclude current page
- Include a php file that is above WP installation hierarchically?
- Using existing widget code! [closed]
- Widget header unique classes
- Banner editable from backend
- Using a loop to build and update widgets
- Edit the Publish Widget Options
- php “use” not working in template [closed]
- Shortcode to include PHP file, pass various parameters to include?
- Should I use include(_once) or require(_once) for loading php-file with customizer settings?
- how to check elementor is widget is active or loaded
- How to edit a widget code?