• Okay, so I have this very weird problem. I am building a WP-site, and so far everything has gone great. I know I should be making it on localhost, but I have some problems with some ports, so currently I am not. However, when I try to upload the single.php file, nothing happens. When I upload or edit other files on the same site and server, it works perfectly, but when I upload the single page, nothing happens.. I’ve even tried uploading gibberish just to see if I could mess up the site at least, but I cannot do that either! I’ve emptied the cache on the browser, used different browsers and so on, so I thats not the problem..

    Is it a genius out there with a solution to this weird problem? If so, thank you ever so much!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Which theme is this regarding?

    When you say nothing happens do you mean your changes do not show or do you mean you see a blank page?

    Can you verify that single.php on the server is the same as the local copy? It’s possible it hasn’t actually uploaded. Also make sure you are viewing an individual blog post. Lastly, if you’re using a caching plugin, go to its settings and clear the cache.

    Thread Starter LBA1403

    (@lba1403)

    @andre Nevins Im creating my own theme

    @steven Gliebe The changes does not show, it looks just like the indexpage.

    I doubblechecked, and the file on the server and the local copy are equal. And yes, that would be a silly error even though it’s possible, but I am sure I am viewing an individual blog post. I am not using any caching plugin either..

    index.php would be used if there is no single.php file. Here are some other things to try:

    – Clear out your functions.php file in case something there is interfering

    – Try deactivating all plugins in case there is a conflict. If the problem goes away while all plugins are inactive, then reactivate them one by one to determine which is causing the problem.

    – Review the template hierarchy for clues: https://codex.www.ads-software.com/Template_Hierarchy

    – Check these for clues:

    https://stackoverflow.com/questions/14200324/wordpress-use-index-php-instead-of-single-php-to-show-post

    https://www.ads-software.com/support/topic/all-pages-and-posts-using-index-template-404-errors-not-getting-called?replies=15

    – Switch to the default Twenty Fourteen theme. Does the issue happen there? If it does then the issue is one in general. If it doesn’t, the issue is specific to your theme.

    Thread Starter LBA1403

    (@lba1403)

    Tried all the different suggestions, sadly, not one solved my problem. And when I did try to change the theme to Twenty Fourteen, I had the same problem! What could then be the problem?

    Thread Starter LBA1403

    (@lba1403)

    However, now I managed to spot some of the error, I think! I am using custom fields, and when I by mistake hit one of the few test-pages made before I installed custom fields, the single page showed up! However, I would very much like to keep my custom fields, and it does not explain why the single.php file did not work in any of the other themes.. But I guess it can be used as somewhat of a quickfix, even though at some point I will need to get custom fields and single.php to work at the same time..

    If the issue shows even with Twenty Fourteen and with all plugins deactivated then it’s likely an issue in general relating to WordPress and maybe the server environment or .htaccess.

    You may want to try a fresh install on the same server and see if the issue is there or not. This will help you determine whether or not it’s an issue with the server envirnment or if your other WordPress install has an oddity of its own.

    Thread Starter LBA1403

    (@lba1403)

    Hmm, I do not understand why, but suddenly it works perfectly fine after I added a page.php, not that it should matter.. Well, I guess Im just supposed to go on never knowing what the error was, oh well, at least it works now, thank you Steven for your suggestions anyway!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Problem with single.php’ is closed to new replies.