0

I am converting HTML to Wordpress theme. I am enqueuing stylesheet. but some of the images are not showing. Maybe its could be subfolder issue

  • 1
    Welcome to stack overflow, you might want to provide some code snippets to give us a better picture of what you're trying to do. – mattbell87 Aug 08 '19 at 23:46

1 Answers1

0

It is almost certainly a pathing issue -- without being able to see any of your file structure or code, I suspect get_template_directory_uri() is the missing piece. Here's a simplified example of what you need to do.

function itc_wp_enqueue_scripts() {
    wp_enqueue_style('bootstrap-style', get_template_directory_uri() . '/css/bootstrap.min.css');
}

add_action('wp_enqueue_scripts', 'itc_wp_enqueue_scripts');

You should replace itc_ with your own prefix on the function name.

James Allen
  • 969
  • 4
  • 16
  • I like your answer but the only problem I am facing is missing images while enqueuing. is that any specific way to load images – Ehxan Khokhar Aug 09 '19 at 19:48