WordPress.org

Ready to get started?Download WordPress

Forums

Thematic Gallery theme - Single posts not loading (4 posts)

  1. NativePaul
    Member
    Posted 4 years ago #

    My site has a strange bug that came out of nowhere.
    http://www.nativenoise.co.za/

    Single posts are just not loading. The page seems to time out half way through creating the categories menu. The menu loads fine on the home, archive, search and 404 pages. It is just the single posts that won't load.

    The site was working perfectly and then this error started happening. I haven't changed anything.

    I uploaded a fresh copy of the gallery and thematic themes to rule out any customizations I'd done but the problem persists.
    Other themes work and load the single posts without any problems.

    Any suggestions will be welcome and help greatly appreciated.

  2. NativePaul
    Member
    Posted 4 years ago #

    I backed up my entire site and database then installed it on a local testing server.
    It works fine on my local machine.

    Then I'm assuming the problem lies with my server. Anyone know what might cause the site to time-out when loading single posts?
    I even created tiny posts to see if less content would load quicker but that doesn't make a difference.

  3. NativePaul
    Member
    Posted 4 years ago #

    If anyone is interested, I found a solution to my problem, although I'm certain it's not the best one.

    I copied single.php from thematic to gallery's theme folder.
    I then cut the "single post" code from gallery's functions.php
    and pasted it into my new single.php file. I removed most of the code from thematic's single.php file and it didn't make a difference.

    <?php get_header() ?>
    	<div id="container">
    		<div id="content">
    
    // Paste the Single Post code from gallery's functions file
    
    <?php thematic_comments_template(); ?>
    		</div><!-- #content -->
    	</div><!-- #container -->
    <?php get_footer() ?>

    I still don't know why my site wasn't working and I have no idea why this makes it work instead.

    My server is really slow, and this theme makes my site even slower. I think the error was caused by the page timing out before all the functions could be called.

    I worry that using a theme framework is slowing it down - is that likely to be the problem?

  4. joperron
    Member
    Posted 4 years ago #

    Hello,

    To fix this go to line 130 of gallery's functions.php file and delete the following:

    {
        $shortenedurl = file_get_contents('http://tinyurl.com/api-create.php?url=' . urlencode(get_permalink()));
    	} else {
    		$shortenedurl = urlencode(get_permalink());
    	}

    Basically your webserver blocks the script from creating a tinyurl to replace wordpress' normal permalink.

    VoilĂ 

Topic Closed

This topic has been closed to new replies.

About this Topic