Forums

Problems with a Custom-Made WordPress Theme (31 posts)

  1. andrew-s3
    Member
    Posted 8 months ago #

    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.

  2. Digital Raindrops
    Member
    Posted 8 months ago #

    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.
    http://pastebin.com/ktksv3dC

    HTH

    David

  3. andrew-s3
    Member
    Posted 8 months ago #

    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.

  4. Digital Raindrops
    Member
    Posted 8 months ago #

    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

  5. andrew-s3
    Member
    Posted 8 months ago #

    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.

  6. Digital Raindrops
    Member
    Posted 8 months ago #

    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

  7. andrew-s3
    Member
    Posted 8 months ago #

    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!

  8. Digital Raindrops
    Member
    Posted 8 months ago #

    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

  9. andrew-s3
    Member
    Posted 8 months ago #

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

  10. Digital Raindrops
    Member
    Posted 8 months ago #

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

    David

  11. andrew-s3
    Member
    Posted 8 months ago #

    thanks for all the help David

  12. andrew-s3
    Member
    Posted 8 months ago #

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

  13. Digital Raindrops
    Member
    Posted 8 months ago #

    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

  14. andrew-s3
    Member
    Posted 8 months ago #

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

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

  15. andrew-s3
    Member
    Posted 8 months ago #

    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

  16. Digital Raindrops
    Member
    Posted 8 months ago #

    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

  17. andrew-s3
    Member
    Posted 8 months ago #

    still doesn't like it when i re-upload my page.php file... i know it's not necessary for WP to function, but in order for me to have a second page template i need it :-/ or I have to write some ridiculously long conditional IF, Else statement for those containers which i want to hide on internal pages... lol

  18. andrew-s3
    Member
    Posted 8 months ago #

    still can't understand why when i upload my page.php file that only the "front page" is able to be displayed and no "pages" can be displayed; I get a 500 internal server error....

  19. Digital Raindrops
    Member
    Posted 8 months ago #

    Update pastebin with your latest page.php, header.php, footer.php and sidebar.php

    The pages in the link above are working, but it looks like the div nesting is wrong, re-size the browser and the background gets out of line.

    Look at the last two validation errors, there seems to be two closing tags missing!

    Regards

    David

  20. andrew-s3
    Member
    Posted 8 months ago #

    page.php
    header.php
    footer.php
    sidebar.php <-- even though it's never called.

  21. Digital Raindrops
    Member
    Posted 8 months ago #

    There are extra closing table element tags and closing div tags outside the 'page-5' conditional code, made harder as the two conditions are in the header and footer and not in a page-5.php file.

    I tried to look at it paste all three files into one file, but the nested tables are out of line, and there was a closing div with no opening div.

    Strip out the code blocks build the nested divs and tables in a single file first then add back the code bit at a time!

    create one file for page 5 and one default page then split the code out into the three files.

    HTH

    David

  22. andrew-s3
    Member
    Posted 8 months ago #

    Sounds like more work than necessary; it's working in it's current state w/o a page.php file. I don't know how I frankensteined it let alone why it's not working w/ the page.php file... but I don't have the time to fart around w/ it anymore... sadly.

  23. Digital Raindrops
    Member
    Posted 8 months ago #

    Hi andrew,
    For rotators, image ribbons, menus etc: I use template parts, makes them portatble easy to bug fix and makes the code easy to read.

    It would be ideal for your theme, as it breaks the code blocks down into several files.

    This simple example is a footer latest post image ribbon, I put the code into a template part and call it in footer.php with a single line of code, I can them drop it into any theme.

    Regards

    David

  24. andrew-s3
    Member
    Posted 8 months ago #

    I will definitely start using them!

    on a side note; for some reason WP will not display a single post on a page... ie. click ideas & insights (blog) and click one of the headers. I tried it w/ and w/o my single.php file uploaded. I have a feeling this problem is the same problem as the page.php file... my McGuyver tactics are starting to fail on me ;-/

  25. andrew-s3
    Member
    Posted 8 months ago #

    and by the grace of god, everything is now functioning perfectly with all files in place... wtf?!

    header.php
    footer.php
    functions.php
    index.php
    page.php
    sidebar.php
    single.php

    again, David... thank you thank you thank you for all your help and patience; you've just gained a new subscriber to your blog ;)

  26. Digital Raindrops
    Member
    Posted 8 months ago #

    Still funky when you re-size it in the browser, look at about us and resize.

    HTH

    David

  27. andrew-s3
    Member
    Posted 8 months ago #

    what browser are you using; i'm using all current releases of:
    Chrome
    IE
    FireFox

    and they all look fine, i've got 3 monitors that i'm stretching my browser window across and it looks fine

    also, i'm going to add, i'm on a PC not a MAC

  28. Digital Raindrops
    Member
    Posted 8 months ago #

    Streching is find but shrink it and look!

    PC not Mac, Browser IE, FireFox & Chrome, screen size 22" all fine, resize browser!
    http://digitalraindrops.net/images/resize.png

    HTH

    David

  29. andrew-s3
    Member
    Posted 8 months ago #

    i can't get it to do that in my IE...

  30. andrew-s3
    Member
    Posted 8 months ago #

    it shows up that way in Chrome/Firefox; but not sure how to fix it; can't get it replicated in IE... my co-worker believes it's because something has a fixed-width that is causing the BG problem... though i'm not sure.

Reply »

You must log in to post.

About this Topic