Create “images” folder in current active theme the put “https://wordpress.stackexchange.com/questions/332635/dummy-image-1-1.jpg” in that folder.
<?php
if ($the_query->have_posts() ) :
while ($the_query->have_posts()) : $the_query->the_post();
if ( has_post_thumbnail( ) ) {
the_post_thumbnail( 'full', array( 'class' => 'mySlides' ) );
} else {
?>
<img src="https://wordpress.stackexchange.com/questions/332635/<?php echo get_template_directory_uri()."/images/dummy-image-1-1.jpg'; ?>" class="mySlides" height="350px"/>
<?php
}
endwhile;
else:
?>
<img src="https://wordpress.stackexchange.com/questions/332635/<?php echo get_template_directory_uri()."/images/dummy-image-1-1.jpg'; ?>" class="mySlides" height="350px"/>
<?php
endif;
wp_reset_postdata();
?>
Use path according to the theme(parent or child)
-
get_stylesheet_directory_uri()
: url path to current Theme directory -
get_template_directory_uri()
: url path to parent Theme directory