Use plugin_dir_path()
to include executable files. plugins_url()
returns the web address, that’s not what you need.
<?php include(plugin_dir_path(__FILE__) . 'forms/admin_form.php') ?>
Related Posts:
- 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
- ob_get_clean returns empty string, ob_get_flush outputs string
- where to include a php file
- Include Class File in WordPress
- nowplaying.include.php Will Not Display Results
- integrating external php library into wordpress- the right way
- Change title and meta description in included page (not template)
- Can I change a variable in a content part while calling it?
- the_author() not working outside the loop
- 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
- functions.php is being included twice, creating PHP fatal errors
- Custom theme: Alternatives to long list of ‘include’ in functions.php
- PHP help get_template_directory + PHP include
- code is skipping a div
- PHP include is only working in certain places in my custom WP theme
- Correct and safe way to include php content in my page
- What is the proper way to include a PHP framework into my theme?
- php include not working in custom page
- Post’s ID pattern?
- Using WP functions such as the_title() in an included php file
- What’s the best way to include PHP code in pages?
- How to include custom PHP file both in header and footer files
- Include a file that has a function in it
- How do I call an external php non WordPress class into functions.php?
- require get_template_directory() . ‘path/to-my/file.php’ BREAKS customize > themes functionality
- Before & After Content – After Content directly below Before Content when using require_once
- loading a php file to a specific page id
- 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
- PHP get_category() function redeclared
- How do I / Is it possible to execute an external PHP file / function inside WordPress?
- Include a php file that is above WP installation hierarchically?
- How can I include a file related to blog URL? Nothing seems to work
- WordPress blog set up
- Shortcode not passing variable to included file
- php “use” not working in template [closed]
- How to include a php file in every post and page [duplicate]
- Shortcode to include PHP file, pass various parameters to include?
- wordpress.org disallowing my plugin becuase of loading core files in cron cpanel file
- Should I use include(_once) or require(_once) for loading php-file with customizer settings?
- Sending the reset password link programatically
- How to change upload directory in wp_handle_upload
- Calculate percentage of post by category
- the_title() & the_content() are retrieving Post details inside a Page, after calling a shortcode
- register_rest_route regex option for base64 or alternate
- Woocommerce – How to get products which have a sale between 20% to 40%? [closed]
- Customized title tag for each page in pagination?
- Can is_page() be combined with a switch control structure?
- is it possible to force wordpress to always save thumbnails as ‘jpg’ not ‘png’
- Run a filter when a walker runs
- WordPress (3.9.1) MultiSite Permissions. Is chown the answer?
- have_posts() execution failure
- WordPress with php 5.5 and zend opcache
- my posts are saved as drafts
- How can I remove a function that has been added to wordpress with add_filter?
- Create a range slider to change font-size with different screens sizes in wordpress customizer api
- Are there security or other issues with changing PHP time limit and max input vars?
- How can I pass a custom/dynamic product to the Woocommerce cart?
- Adding Taxonomy Image to taxonomy loop [closed]
- Irregular TTFB and server wait time response
- Two menus show up
- How to determine if the sidebar is empty? Or not active?
- WordPress member notification
- Unset session variable on page reload / setup but exclude AJAX
- Create page with custom php script and fetched data
- How to show an entire post content and not also the excerpt?
- WordPress shortcode returns the data before
- Sort posts in a specific way
- How to hide post in WordPress
- The user can only see their own profile
- Hide a div when a custom field is empty
- Post meta select input, if statement
- Fatal Error wp-settings.php on line 119
- what does $options = get_option(‘test_theme’); do?
- WordPress url By country code?
- How to change basename url for wp-admin?
- Prevent header and footer from loading on specific pages with template or plugin
- Get taxonomy terms that share a common object property
- WordPress all php BUT index.php downloads instead of loads
- Trouble matching strings (titles) using wp_query
- Current WordPress Page Title as Search Parameter into A Tag
- Limit the number of characters/words in an excerpt for a related posts section
- Yoast Breadcrumbs Inject Multiple Levels
- Maximum file Upload
- Unzip_file causing Media file upload error
- Primary navigation menu with timed items from custom post type
- WooCommerce – Add Shipping class below each product in Shopping Cart page
- Escaping a Single Quote in str_replace for Nav Function
- Use fetch_feed(); Totally Outside of WordPress?
- widget: input the px value from user and use it as inline style in widget function
- Create a dynamic buddupress tab
- Problems with plugin that fetches data from database with ajax
- When I use rewind_post() it shows menu items in my loop
- How to create categories out of a list of words?
- Difference between php memory limit and wp memory limit?
- Custom Post Type doesn’t have template content when creating programmatically in PHP but does when created in WP Admin