I have created a custom post type in WordPress with CPT UI named eggs.
In the file named eggs.php I put this code:
<?php
$args = array('post_type' => 'eggs');
$query = new WP_Query($args);
?>
<?php if ($query->have_posts() ) : while( $query->have_posts() ) : $query->the_post(); ?>
<a href="<?php the_permalink(); ?>" Go to Eggs Single Page</a>
<?php endwhile; endif; wp_reset_postdata(); ?>
Now I have created a file named single-eggs.php and when I click on the permalink it redirects me on a page where it says "Sorry, no posts matchef your criteria." . It doesn't go to the page single-eggs.php as I want.
EDIT: Currently I am using Custom Post Type UI plugin by WebDevStudios. When I'm using the Types plugin from OnTheGoSystems it finds the single-template.php. Is it something wrong with the plugin maybe?