WordPress.org

Ready to get started?Download WordPress

Forums

Problem with single.php (9 posts)

  1. LBA1403
    Member
    Posted 3 months ago #

    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!

  2. Andrew Nevins
    Barrel Rider, Spam Zapper & Volunteer Moderator
    Posted 3 months ago #

    Which theme is this regarding?

  3. Steven Gliebe
    Member
    Posted 3 months ago #

    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.

  4. LBA1403
    Member
    Posted 3 months ago #

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

  5. Steven Gliebe
    Member
    Posted 3 months ago #

    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: http://codex.wordpress.org/Template_Hierarchy

    - Check these for clues:

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

    http://wordpress.org/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.

  6. LBA1403
    Member
    Posted 3 months ago #

    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?

  7. LBA1403
    Member
    Posted 3 months ago #

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

  8. Steven Gliebe
    Member
    Posted 3 months ago #

    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.

  9. LBA1403
    Member
    Posted 3 months ago #

    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!

Reply

You must log in to post.

About this Topic

Tags