• I’ve never run into this problem before when using my coding structure; but for some reason this theme just doesn’t seem to want to work. When I first installed the theme after creation it worked fine; I went to create an additional page template, uploaded the new files; and it returned a ‘500 internal server error’
    I reverted my files back to what they were when it was functioning and the error persisted. Now I can’t seem to get it work at all, no matter what I do; yet the TwentyTen and TwentyEleven themes work fine to my dismay.

    At this point I’ve been staring at the same code for about 12 hours and have yet to be able to fix the problem, maybe someone can enlighten me.

    the site is located here: LINK

    here’s my header.php
    here’s my footer.php
    here’s my functions.php
    here’s my sidebar.php
    here’s my index.php
    here’s my single.php
    here’s my page.php

    hopefully that’s all you’ll need for reference, if not please ask below and I’ll provide it to you.

    hopefully a fresh pair of eyes is all it will take to see what i’m missing…. i sure as hell can’t find it.

Viewing 15 replies - 1 through 15 (of 30 total)
  • In functions.php remove the closing php tag ?> and the empty line below!

    From pastebin lines.

    32. ?>
    33.

    Lines 32 and 33.

    All other files require the closing php tags ?> except functions.php

    EDIT:
    Just Checked and edited the code and pastebin seems to add an extra line.
    https://pastebin.com/ktksv3dC

    HTH

    David

    Thread Starter andrew-s3

    (@andrew-s3)

    i removed it; nothing changed.

    i also tested the theme on my //localhost directory using iis and XAMPP and it works like a charm… I’m thinking it has something to do with either:

    1) the WP install
    2) the database tables
    3) the server is el broke-oh

    but i have other sites running wp on this test server just fine; just not this one :-/ go figure.

    Thanks for the stab at it at least; and I learned something new… didn’t know that about the functions.php file prior.

    Thanks for the stab at it at least; and I learned something new… didn’t know that about the functions.php file prior.

    unclosed php tags and whitespace at the end of other files accounts for most of the header already sent fatal errors.

    Regards

    David

    Thread Starter andrew-s3

    (@andrew-s3)

    all my files are ending on the final line of code and i tend to eliminate all the unnecessary whitespace in my code. I’m not sure what it could be, let alone, why it’s working flawlessly in XAMPP on IIS/APACHE Locally, but as soon as it hits the webserver it takes a crap on me.

    I’ve re-installed WP 3 different times, and uploaded my theme and none of them seem to have it working, which makes me believe that it’s a server or .htaccess error.

    I see the wp-admin is working and the message mentions a resource so it is the theme and not WP or the database.

    If the hosted environment is not iss then it can act differently, xampp and iis is not case-sensitive for folder names and links where other servers are.

    I had a folder /icons/32X32/ and /icons/32x32/ worked with Windows Server, IIS and XAMPP, but not on other servers.

    I found this in index.php

    <?php previous_post_link('?%link') ?> <?php next_post_link('%link?') ?>

    Missing the closing ; in the php statements.

    <?php previous_post_link('?%link'); ?><?php next_post_link('%link?'); ?>

    If that fails try setting a page for the home page in settings and see it it loads.

    Just saving page.php as home.php or front-page.php will load that instead of index.php for testing and elimination.

    HTH

    David

    Thread Starter andrew-s3

    (@andrew-s3)

    I couldn’t find that code you found there about the previous/next links; but i found a category php reference with a similar problem; I also recognized that my sidebar was being called; which i’m not using… somehow my files seemed to have gotten corrupted… BUT it’s working!

    I couldn’t find that code you found there about the previous/next links;

    I see it is working ??

    The code is in index.php line:39 and single.php line:37

    Regards

    David

    Thread Starter andrew-s3

    (@andrew-s3)

    that’s strange… my line 39 in dreamweaver is empty…….. ghost code!

    lol, I only have the pastebin, leave you to it now.

    David

    Thread Starter andrew-s3

    (@andrew-s3)

    thanks for all the help David

    Thread Starter andrew-s3

    (@andrew-s3)

    Though, the weird part now is; the home/posts page is working fine; but any PAGES are broken, still erroring out….

    sidebar.php is calling itself on line:42 the old ‘recursive function calls’.

    <?php wp_sidebar(); ?>

    If that fails remove the call to the sidebar in page.php and test.

    Loving the challange?

    HTH

    David

    Thread Starter andrew-s3

    (@andrew-s3)

    [Code moderated as per the Forum Rules. Please use the pastebin]

    that’s my page.php and it still doesn’t like it…

    Thread Starter andrew-s3

    (@andrew-s3)

    i’ve deleted it; i think i’m just going to say F it and do a header.php w/ conditional tags to show/hide my rotator on the homepage etc. instead of trying to make page templates… for some reason this site just wants to p*** me off! lol! i’ve never had so many problems…..le sigh

    Cannot see any thing in the page code, next is the footer.php

    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Footer Widget Area 1') ) ?>

    Same missing closing statement twice ;

    <?php if( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Footer Widget Area 1') ); ?>

    B.T.W.

    sidebar.php is calling itself on line:42 the old ‘recursive function calls’.

    I have checked I was thinking of get_sidebar() there is a wp_header and a wp_footer WordPress action hook, I do not think there is one for wp_sidebar
    <?php wp_sidebar(); ?>

    HTH

    David

Viewing 15 replies - 1 through 15 (of 30 total)
  • The topic ‘Problems with a Custom-Made WordPress Theme’ is closed to new replies.