Tag Archives: importing a file in wordpress

How to include a php file in WordPress?

By | April 14, 2021

If you are dealing with wordpress coding and wish to include a file in your coding, you can simply give the path to the file and add it in the following manner,   require_once( plugin_dir_path( __FILE__ ) . ‘fileyouwanttoadd.php’ ); Post Views: 300