• I’m building my website on a custom made template. So far so good with all other files such as header.php, index.php etc. But now I want to make single pages for posts. As I read WordPress recognizes single.php automatically and assigns it to posts. Is it so?

    In my case clicking on a post uses its permalink and does basically nothing. As I know it should return a blank page, if single.php is empty and is present in the template directory.

    Could you help me please? I’m desperate already.

Viewing 5 replies - 1 through 5 (of 5 total)
  • It should return a blank page. Can you clarify what you mean by “does basically nothing”?

    Thread Starter Roland Yegorov

    (@rolandjeg)

    Clicking on a post I get redirected via the permalink which leads to the index.php page (i.e. the same page) The permalink is also one for all posts. I reckon posts should have a unique id in the link.

    Can you post the contents of your index.php to Pastebin and post the link here? What are your permalink settings (Dashboard > Settings > Permalinks)?

    Thread Starter Roland Yegorov

    (@rolandjeg)

    Here is the index.php: http://pastebin.com/fqgPMMxZ

    Ohh…thank you! I managed to find the cause. My permalinks were set to manual instead of default.

    Glad you have it figured out. I did notice that you’ve got a hardcoded URL when you call the_permalink(). That’s not necessary, as WordPress does the right thing on its own. IIRC, WordPress doesn’t even consider any arguments passed to the_permalink().

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Single.php not working’ is closed to new replies.