I am having a hard time understanding exactly what the problem is but two things come to mind.
locate_template
searches theme directories. It is not
a general purpose file loader. I don’t know if that is relevant to
your case. There is not enough detail in the question to work that
out. Given that you have not mentioned themes at all and are only talking about “external scripts” and plugins, I suspect that this is the problem.- You may be having scope issues with the includes.
Related Posts:
- How do I replace a function, declared inside a plugin’s class, in functions.php?
- is_plugin_active() returning false on active plugin
- Unable to check if plugin is active
- How to include a plugin’s php file to another plugin functions file [duplicate]
- Change the path where wordpress plugins are uploaded
- Problem requiring/including plugin files with plugin_dir_path( __FILE__ )
- Which method is best to enqueue scripts
- How to call plugin path in JS?
- Absolute Path (ABSPATH) in WordPress is not working
- Save and retrieve custom plugin options value
- Why does including a file in theme’s functions.php not work?
- Include files for a plugin not including
- Adding rich text editor to my plugin
- Migrating a File from Plugin to Theme and changing its path → instead create a REST endpoint
- I need to add a custom “cover” to every new post — plugin or custom setup?
- Get uploaded image url
- Is it ok to call get_option without hooks?
- Settings API – input always updates over validation
- WP Paths in a Plugin – how to include
- plugins_url function mixes system path and URL
- Serialize data for wp options
- Creating plugin using simple_html_dom parser?
- Added slug after URL permalink last slash returns different content
- Add Plugin options as subpage to Theme options page
- Retrieving a path when dealing with composer packages
- Use of Templates in a Plugin
- Include comments form in plugin page
- Create tabs in admin options page from custom post type loop
- WP Plugins – Use includes to display page content
- Using arbitrary paths in page urls
- Plugin Options not being output
- Gathering and logging data from a plugin: how to do it without race conditions?
- How to get path or root of plugin folder, not file or dir?
- Slashes stripped in ACF
- Use $variable from file1.php in file2.php (different file paths)
- How to automatically redirect to custom admin menu after plugin activation?
- Correct Plugin File Path
- Hardcoded paths in my plugin
- CMB2 – array_search or in_array from repeat_group and comma separated values
- Trying to include files in plugin isn’t working
- Absolute paths in backend for plugins after moving wordpress
- Using plugin_dir_path() with WordPress on MAMP
- Replace image urls(absolute instead of relative) by using filter in single page
- wp_options not returning value for logged out users?
- Displaying page content from plugin, inside exising empty WP page
- how to show new field if option selected?
- FPDF for creating pdf diplomas
- Include my files in a plugin? [duplicate]
- Failed GET Request From admin.php To Fetch .min.js File From Unminifed Directory
- path of wp-content directory when we are on some plugin
- How to store multiple instances of the plugin’s options for various shortcodes
- Get not the full path
- Unexpected plugin_dir_path Output
- How to write wordpress plugins faster to load?
- Plugin options not appearing on options page using tabbed navigation
- How to tell if a script is being executed from a plugin, a theme or a child theme in WordPress?
- Server Path Information
- show Visual form builder in the front end
- Including a PHP file via a function that is part of a plugin?
- Register additional wp plugin directory
- Shortcode return is printing a 1 afterward
- White Screen When Includding A Folder With PHP Files
- php include returns 1 as output with other outputs [closed]
- WP-DBManager Plugin Can’t Find Mysql Path
- Display file contents within Plugin
- Namespaces in WordPress – How do I initiate the main class?
- Image Crop/Resize Function/Code Sinppet/Plugin to adjust/crop images during upload
- post expire after x days
- How to handle autoloading with composer by keeping the WordPress naming conventions?
- Minimum PHP Required for WordPress
- tag breaks shortcode output (other solutions don’t work)
- How to overwrite core/libraries/vendor template with child theme
- Plugin integrate in forum to show user profiles [closed]
- how to add text to posts from tags
- How to include this jQuery File in wordpress?
- Why do plugins often ask to add in to templates?
- Is it fair to use MIT licensed code in WordPress plugins? [closed]
- How do I find out which plugin is exceeding memory limits?
- Taxonomy Drill-Down / Plugin Help – hierarchical queries within plugin?
- PHP script from functions php is loaded via admin-ajax to div…and the result is 0, not the desired content
- Load plugin script in specific page
- Call ajax on the frontend
- How do I profit from a Plugin?
- Can I customize an Elementor template after inserting it? [closed]
- How to Access a file that is inside a plugin’s dir from the theme’s `functions.php` file
- i can not access the post in custom template of my wordpress plugin
- How to avoid the 403 Forbidden error in a WP Plugin with Ajax and PHP
- Allow editor user to full permission to access plugin settings
- How to remove row action “Edit with Visual Composer” in the post list table?
- Defined user role to access plugin’s pages
- How to add wpmode in Flash Embed Code in WordPress Site?
- Better code/text editing for posts and pages?
- Saving an array to get_options
- How to set different users for different pages?
- Is there a way to add a custom input field for every taxonomy term in WP post editor?
- Plugin keeps saying needs to be updated and it’s in a constant loop [closed]
- wp plugin not working after website live
- Code snippet plugin not working correctly with Windows live writer and WordPress
- How to add an active state class to my info box
- Using ACF to allow user to add and edit multiple saved forms