Why isnt my single page working? Never experienced this before

Hi,

I have a custom post type “news”, and a couple of posts in it.

I also have a single-news.php with this markup(very basic so far):

<?php get_header(); ?>

	<?php while(have_posts()) : the_post(); ?>

	<div class="single-news-wrapper scene_element scene_element--fadein">

	</div>

	<?php endwhile; ?>

<?php get_footer(); ?>

However, when i click a post I get a blank page. And when i inspect the console I can see:

Failed to load resource: the server responded with a status of 404 (Not Found)

Listed for every post.

Anyone have a quess why it’s like this? I have made many single pages before without any issues.

Where’s your content inside the loop? You need at least <?php the_content(); ?> to display the post. You might even want to have <?php the_title(); ?> before that.

hi yeah, but that doesnt do anything. I have added both content/title now but when i click a post thumbnail i only get a white screen. And if i inspect i see nothing. And still the Failed to load resource: the server responded with a status of 404 (Not Found) in the console.

Did you recently change your Permalinks setting?

Nope, tried change from “post name” to “default” now but no difference.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.