Single.html not showing content

Hi there,

when I have a ‘read more’ button in Pinegrow, when clicked, it shows everything about the post, except the content. The title is ok, and also the date, excerpt, … but for some weird reason, it doesn’t show the actual content.

Does anyone knows what I’m missing here?

Where is the loop action ?

Hi,

well, I followed the tutorial on this page (number 13 it is) and either I missed it or either there is no mention of a loop?

13 - How to create SINGLE.PHP template

So I checked again and there’s no loop in that tutorial?

And if I create a loop, I would have difficulties on transferring the right post ID in the link of the ‘read more’ buttons (there are 3 CPT’s on the front-page.html):

(to be clear: last 2 divs are mockup, on the server only the first one is repeated 3 times so it is 3 different posts)

So the button on the front-page.html looks like this:

It refers to the post permalink so I thought no loop was necessary in the single.html page since the permalink already knows what post is to be displayed.

Ok, for those who have the same problem: adding a loop is the problem. I think that someone mentioned it here :wink:

Problem was that when I added the loop, it autofilled a query from previous attempts so it showed every post instead of a single one. By simply removing the query name in Pinegrow, this issue was solved.

Thanks again to @Emmanuel for the tremendous efforts in helping me.

1 Like