How can I include an external file in a post or page?

Use get_template_part to insert regularly used files throughout your site. Example of use: get_template_part( ‘PATH/FILE_NAME’ ); Where PATH is the location of the file you want to include, usually a folder within your theme/child-theme example(my-template-folder) NOTE! without leading slash. FILE_NAME is the name of your file, WITHOUT extension, example (my-regular-code.php becomes my-regular-code). So the above … Read more

Having trouble linking to file using relative path

I got this to work by using include_once(plugin_dir_path( __FILE__ ) . ‘/../tpls/frontend.php’); The file I’m using include_once in is itself included from the index.php file in the plugin’s root directory so, according to the documentation on the subject, a relative path to the file will be relative to the root directory, not the inc folder. … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)