• I was trying to get rid of “featured image” parts of the code on my content-page.php and NOW my pages are showing this ==== Parse error: syntax error, unexpected end of file in
    PLEASE HELP SO I CAN GET MY BLOG BACK UP AND RUNNING! ??
    Here is the entire coding for my content-page.php

    <?php
    /**
    * Displays posts
    *
    * Used for single, index, archive, and search pages.
    *
    * @since Bluesand 1.0
    */
    ?>
    <article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
    <?php if ( !is_search() ) : ?>
    <?php if ( has_post_thumbnail() ) : ?>
    <div class = “featured-img”>
    <?php the_post_thumbnail(); ?>
    </div>
    <?php endif; ?>
    <?php endif; ?>

    <?php if ( is_single() ) : ?>
    <h1 class=”post-title”><?php the_title(); ?></h1>

    <?php else: ?>
    <h1 class=”post-title”>“><?php the_title(); ?></h1>

    <?php endif; ?>
    <div class=”post-meta”>
    <?php if ( is_sticky() && is_home() && ! is_paged() ) :
    echo ‘<span class=”genericon genericon-pinned”></span><span class=”sticky-post”>’ . __( ‘Sticky /’, ‘bluesand’ ) . ‘</span>’;
    endif; ?>

    ” href=”<?php the_permalink(); ?>”><?php the_time(‘F j, Y’); ?>

    <span class=”separator”> / </span>

    <span class=”author-link”><?php the_author_posts_link(); ?></span>

    <?php if ( comments_open() ) : //if comments are allowed for current post, add link to comments ?>
    <span class=”separator”> / </span>
    <?php comments_popup_link( __( ‘0 comments’, ‘bluesand’ ), __( ‘1 comment’, ‘bluesand’ ), __( ‘% comments’, ‘bluesand’ ), ‘comments-link’ ); ?>

    <?php endif; ?>

    <?php if ( current_user_can(‘edit_posts’) ) : ?>
    <span class=”separator”> / </span>
    <?php edit_post_link( __( ‘Edit’, ‘bluesand’ ), ‘<span class=”edit-link”>’, ‘</span>’); ?>
    <?php endif; ?>

    </div> <!– post-meta –>

    <?php if ( is_search() ) : ?>
    <?php the_excerpt(); ?>

    <?php else : ?>
    <?php the_content( __( ‘Continue Reading’, ‘bluesand’ ) ); ?>
    <?php wp_link_pages( array(
    ‘before’ => ‘<div class=”post-pages”><span>’ . __( ‘Pages: ‘, ‘bluesand’ ) . ‘</span>’,
    ‘after’ => ‘</div>’,
    ‘link_before’ => ‘<span class=”nonactive”>’,
    ‘link_after’ => ‘</span>’
    ) ); ?>

    <?php endif; ?>

    <?php if ( has_category() ) : ?>
    <p class=”category-links”><?php the_category( ‘, ‘ ); ?></p>
    <?php endif; ?>

    <?php the_tags(‘<p class=”tag-links”>’, ‘, ‘, ‘
    </p>’ ); ?>

    </article> <!–post_class–>

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hey kansan5,

    ” href=”<?php the_permalink(); ?>”><?php the_time(‘F j, Y’); ?>

    I believe the error relates to the code above.
    You’re missing the opening tag, of which looks as if you’ve deleted??

    Simply, click Undo – until you get back to the original copy, and then re-upload.

    If you’re unable to undo, try this:

    Change the code above, to the following:

    “><?php the_time(‘F j, Y’); ?>

    Hey sorry, the comments removed some of the code tag

    "<a href="<?php the_permalink(); ?>"><?php the_time('F j, Y'); ?>

    Please use the code ^^ above!!

    Thread Starter kansan5

    (@kansan5)

    * Displays page content
    *
    * @since Bluesand 1.0
    */
    ?>

    <article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>

    <?php if ( !is_search() ) : ?>
    <!–add featured image –>
    <?php if ( has_post_thumbnail() ) : ?>
    <div class = “featured-img”>
    <?php the_post_thumbnail(); ?>
    </div>
    <?php endif; ?>
    <h1 class=”page-title”><?php the_title(); ?></h1>
    </header>
    <?php edit_post_link(); ?>

    <?php the_content(); ?>

    <?php //if page is paginated, display navigation links
    wp_link_pages( array(
    ‘before’ => ‘<div class=”page-links”>’ . __( ‘<span>Pages:</span>’, ‘bluesand’ ),
    ‘after’ => ‘</div>’,
    ‘link_before’ => ‘<span class=”nonactive”>’,
    ‘link_after’ => ‘</span>’
    ) );

    </article> <!–post_class–?>

    I’m not sure where to add that code. Could you tell me where it should go? I think there is a problem with the last line because it is saying “LINE 32” which is that </article> <!–post_class–?>

    Thread Starter kansan5

    (@kansan5)

    I changed the line 32 from:
    </article> <!–post_class–?>

    to:
    endif;
    get_footer(); ?>

    And that brought the page back but now the white background is gone!

    Hey,

    If you copy the code from your first post line 32 is href="<?php the_permalink(); ?>"><?php the_time('F j, Y'); ?>

    You are missing the opening tag. ‘<a’
    Please update the line referenced above to the following:

    <a href="<?php the_permalink(); ?>"><?php the_time('F j, Y'); ?>

    This should then fix it!

    Thread Starter kansan5

    (@kansan5)

    Great! That fixed it thank you! ??

    But now the background is still not white like it used to be. You can see my full background image but I want it to be white behind the words. Any fix for that?

    Please can you send a link to your website, so I can check it out? ??

    Thread Starter kansan5

    (@kansan5)

    Sure! Thanks for all your help!
    The pages that are lacking the background are ABOUT ME and BEST BLOGS

    kansankettlebelle.com

    Quick question, the code you added in yourself ‘get footer’, can you remember if that was there originally?

    If not, please delete that and replace with the original code from your first post ‘</article> <!–post_class–?>’

    Fingers crossed, that may fix it!

    Thread Starter kansan5

    (@kansan5)

    Sadly it starts to give me that error again. Dang! I’m never going to mess with the codes again!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘HELP! (Parse error: syntax error, unexpected end of file in)’ is closed to new replies.