WordPress.org

Ready to get started?Download WordPress

Forums

My WordPress Theme blank screen? (18 posts)

  1. jeffrey_huynh
    Member
    Posted 1 year ago #

    I have created my own wordpress theme with all the necessary files, however I don't know why it comes up with nothing when I activate it? Literally a blank white screen. It doesn't show up with anything in the preview either.

    I'm also having problems testing it locally - I have converted my html code into the correct wordpress theme files, however when I open my index.php file in my local server, I get a blank page. But my html version still works... is this normal? How do I test the theme?

    Very confused and hope to find answers!

  2. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Check your site's error logs for clues.

  3. jeffrey_huynh
    Member
    Posted 1 year ago #

    Thanks for the reply, how do I access my error logs?

    Is it normal to not be able to view themes locally? Because I tried viewing the 'twentyten' theme I have in my theme folder locally but it also gives me a blank page. Am I doing this wrong?

  4. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    how do I access my error logs?

    You will need to ask your hosts for assistance with this.

    Is it normal to not be able to view themes locally?

    Unless you are using a local web server, yes.

  5. jeffrey_huynh
    Member
    Posted 1 year ago #

    Hmmm ok, I will ask my host about it.

    How do people normally view/test their themes?

  6. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

  7. jeffrey_huynh
    Member
    Posted 1 year ago #

    I have installed wordpress locally, and use MAMP (for mac). I designed my website in html/css and tested it using a local server. But when i convert it into a wordpress theme, I cant test it because it's blank?

    Sorry for all these questions, I'm just confused as to why I can't even view themes that I know work (live) on my local server.

  8. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    If you are working locally, turn debug on and enable error logging.

  9. jeffrey_huynh
    Member
    Posted 1 year ago #

    I'm having trouble enabling error logging? It says to "Just place this (code) above any require_once or include commands." I cannot find this?

    I've turned debug on now... nothing has changed?

  10. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    /**
     * This will log all errors notices and warnings to a file called debug.log in
     * wp-content (if Apache does not have write permission, you may need to create
     * the file first and set the appropriate permissions (i.e. use 666) )
     */
    define('WP_DEBUG', true);
    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', false);
  11. jeffrey_huynh
    Member
    Posted 1 year ago #

    ok, I've pasted this code in the wp-config - replacing the define('WP_DEBUG', false); with define('WP_DEBUG', true);

    What should I do now to find the errors? The debug.log file hasn't come up in my wp-content folder.

  12. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Check your server's error log.

  13. jeffrey_huynh
    Member
    Posted 1 year ago #

    Shouldn't this be in my debug.log file that hasn't come up though? How do I check my server's error log?

    I really appreciate this help :)

  14. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Shouldn't this be in my debug.log file that hasn't come up though?

    Not if the error kicks in before WordPress can run.

    How do I check my server's error log?

    Check the documentation for your web server software.

  15. jeffrey_huynh
    Member
    Posted 1 year ago #

    Ok, i checked error logs and it says:

    [07-Dec-2012 21:09:01 UTC] PHP Fatal error: Call to undefined function get_header() in /Applications/MAMP/htdocs/wordpress/wp-content/themes/highondesign/index.php on line 1

    So this means theres something wrong with my get_header() function? I checked and it is correct though?

  16. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Sounds like there's a problem with your local WP install. Try re-uploading all files & folders - except the wp-content folder - from a fresh download of WordPress. Make sure that you delete the old copies of files & folder before uploading the new ones.

  17. jeffrey_huynh
    Member
    Posted 1 year ago #

    My index,php Line 1:

    <?php get_header(); ?>

  18. jeffrey_huynh
    Member
    Posted 1 year ago #

    hmmm, ok I'll have to try that and get back to you. How did you come to that conclusion?

Topic Closed

This topic has been closed to new replies.

About this Topic