i don’t know how to ask my doubt… i will try to make my question easy…
i created a new html file and tried to convert it into wordpress theme.. when i tried to include the files (image,js or anything) using “/sub-directory/filename” it is not including… when i change it into “http://localhost/wordpress/wp-content/themes/ashok/sub-directory/filename”, it is working fine…
i don’t know what is the problem… can u please help me…
Works with every type of file.
If you need to include a template part, let’s say search-form.php use:
Try:
To use this function with subfolders in your theme directory, simply prepend the folder name before the slug. For example, if you have a folder called âpartialsâ in your theme directory and a template part called âcontent-page.phpâ in that sub-folder, you would use get_template_part() like this:
https://developer.wordpress.org/reference/functions/get_template_part/
<?php get_template_part( 'partials/content', 'page' ); ?>