Nhúng file trong theme flatsome

Đây là nhúng code dành cho child theme
require_once ( get_stylesheet_directory() . ‘/shortcode/title1.php’ );
require_once ( get_stylesheet_directory() . ‘/shortcode/news.php’ );

Dành cho theme gốc:
    require_once ( get_template_directory() . ‘foo.php’ );
https://wordpress.stackexchange.com/questions/3293/include-files-in-child-theme-functions-file
You definitely do not want to hard code the URL. The proper way of doing so is
require_once( get_stylesheet_directory(). '/my_included_file.php' );
See more info at WordPress Codex
Now, if your e.g. modifying header.php which has an include you would reference it as follows:
require_once( get_stylesheet_directory() . '/../parenthteme/my_included_file.php' );

Leave a Reply

Your email address will not be published. Required fields are marked *