WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] new WordPress site unable to view single posts

[Resolved] new WordPress site unable to view single posts

  • I’m redoing my portfolio site via WordPress by modifying another theme (in hindsight, not the best idea) and aside from changing the header, footer & background images, it’s close to being done.

    However, the main problems for me, aside from learning code as I go along, are that the site won’t let me go into individual posts on the front page. It simply links back to the home page, displaying “Page Not Found” in the title, but still showing all content. Bizarrely, when I preview other themes, this functionality is restored, but when activated, it’s the same as before.
    Any suggestions or ideas? The work in progress is at http://www.ciaranoconnor.com/wordpress/
    Thanks!

Viewing 11 replies - 1 through 11 (of 11 total)
  • esmi
    Forum Moderator

    @esmi

    You could drop a copy of your theme’s index.php file in the WordPress pastebin and post the pastebin url here. Perhaps someone will be able to spot the problem and suggest a solution.

    That would help a lot!

    http://wordpress.pastebin.ca/1794415

    esmi
    Forum Moderator

    @esmi

    Typical! The pastebin is currently down.

    @ciaranoc: If it comes backup again and I haven’t responded, ping me by responding to this thread. That will highlight it again in my watch list and I’ll pop back.

    henkholland
    Participant

    @henkholland

    Your single.php is not working. Should not the endif in line 116 better be on its own line?
    Use a markup editor to see what is valid and what not.

    Is that toppost sticky?

    Yes, top post is sticky – the thing is that if I click on any of the individual post titles/links, it stays on the home page, rearranging the posts into chronologcial order. Adding a 404.php page means an error page landing on a Google search.

    Still no joy with this, I’m banging my head off a brick wall with this one.

    henkholland
    Participant

    @henkholland

    Quote: “Bizarrely, when I preview other themes, this functionality is restored, but when activated, it’s the same as before.”.

    Is that previewing with a plugin or previewing in the Dashboard without activating and testing in another tab?

    If it’s a pugin, I would disable it or for testing, disable them all for a while.

    If it does not work in the Default theme with standard permalinks and no plugins, than you have a real first.

    Thanks for the reply.

    Previewing in the Dashboard works for each theme, but not when activated. I’ve also tested the site with the plugins disabled and it’s still the same – the default theme gives error 404 pages instead of individual posts, so it seems to be down to poor coding in the single or index php files…

    henkholland
    Participant

    @henkholland

    Hi Ciaranoc,

    While previewing in the Dashboard of a theme, you can not (to my knowledge) test the functionality of a single post link. So what do you mean when you say: “..when I preview other themes, this functionality is restored..”.

    If AFTER selecting the Default theme, you get 404’s, it is not due to poor coding in single, page or index.php, but to permalinks and .htaccess.
    Selecting the DEFAULT permalinks and deleting the .htacces should result in a functional wordpress.

    henkholland
    Participant

    @henkholland

    Oeps, can’t edit my post anymore.
    Sorry, just discovered that you can click any link in the preview of a theme.

    Henk, you’re a legend. Turns out the problem was in my custom permalinks code. I changed it back to the default “ugly” setting, then back to custom structure – /%postname%/ – must have spelt it wrong in the first place, but it works now. Thanks a lot man, I really appreciate your help!

    henkholland
    Participant

    @henkholland

    Good to hear man. Thanks for the update.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Resolved] new WordPress site unable to view single posts’ is closed to new replies.