WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] new WordPress site unable to view single posts (12 posts)

  1. ciaranoc
    Member
    Posted 4 years ago #

    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!

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    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.

  3. ciaranoc
    Member
    Posted 4 years ago #

    That would help a lot!

    http://wordpress.pastebin.ca/1794415

  4. esmi
    Forum Moderator
    Posted 4 years ago #

    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.

  5. henkholland
    Member
    Posted 4 years ago #

    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?

  6. ciaranoc
    Member
    Posted 4 years ago #

    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.

  7. henkholland
    Member
    Posted 4 years ago #

    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.

  8. ciaranoc
    Member
    Posted 4 years ago #

    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...

  9. henkholland
    Member
    Posted 4 years ago #

    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.

  10. henkholland
    Member
    Posted 4 years ago #

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

  11. ciaranoc
    Member
    Posted 4 years ago #

    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!

  12. henkholland
    Member
    Posted 4 years ago #

    Good to hear man. Thanks for the update.

Topic Closed

This topic has been closed to new replies.

About this Topic