Forums

Single Post showing up blank (5 posts)

  1. Craig0678
    Member
    Posted 1 year ago #

    Hi all!

    I have agreed to create a custom theme for a friend in exchange for her services of photographing my wedding. This will be my second WP custome theme, but I haven't worked on coding WP for about 2 years and am struggling more than I thought I would.

    There are a few issues I am running tino simultaneously and I have posted to several other spots on this forum with the individual problems.

    Currently, I have gotten the index page to function as I want it to (i think). I am now working on individual post layouts and specifically working on single.php. The problem is that no matter what I put in my single.php file, nothing shows up in the browser - I get a completey blank screen.

    I assume there is a problem in my php somewhere, but can not identify the error. I copied the code from my index page into single.php - nothing shows. I copied the twetyeleven single.php page - nothing shows.. I followed a couple tutorials for single.php - nothing shows. I'm so frustrated, I don't even know where to troubleshoot anymore.

    So far, I have coded the index, footer, sidebar, header and styles files, as well as adding a couple custom functions. Admittedly, my error could be a faulty function, but since my idex.php page works so far I assumed my functions.php was ok.

    My index.php can be viewed here:

    http://www.niagarathistle.com/clients/weekend_housewife/wordpress/

    Currently, I have pared down the single.php to bare necessities to try to get it functioning. Here is what I currently have in it and still get a blank white screen in the browser:

    <?php get_header(); ?>
    <?php the_post(); ?>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Thanks for any help.

    I am not sure what else you will need to see to help me, but let me know and I will provide it.

  2. cruxwireweb
    Member
    Posted 1 year ago #

    Hi Craig-

    Do you still save something like this at the very top of the page?

    <?php
    /**
     * The Template for displaying all single posts.
     *
     * @package WordPress
     * @subpackage Twenty_Eleven
     * @since Twenty Eleven 1.0
     */
    
    get_header(); ?>

    Those first several lines look like comments you could just clear out, but they are actually functional and necessary.

    Kim

  3. cruxwireweb
    Member
    Posted 1 year ago #

    Also, when I view the source on your page, I see it only shows the first several lines of the header, and stops after it calls the stylesheet. What's the next line of code after that? There might be a syntax problem there.

  4. Craig0678
    Member
    Posted 1 year ago #

    @kim

    I deleted those lines of code. I thought they were unneeded comments. I will put them back in and try again.

    I will also, try to find out what the syntax error is in my header because there is definitely more code in the header.

    Thanks for the assistance. I will report back when I see if the above works.

  5. Craig0678
    Member
    Posted 1 year ago #

    THe following is my full header.php file. Do you see any errors? is there an error with the <?php if (is_singular()) wp_enque_script('comment-reply'); ?> line?

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

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic