• Resolved aprilmwilliams

    (@aprilmwilliams)


    This site has been up for a number of years. https://cuteepatooties.com/. I took over the updates about 6 months ago. Today I added a BLOG page called “what’s new” and two posts.

    The posts display on the page fine but when I click on the title of the post, instead of a post page, I get this error message:

    Here is one of the pages where I get the error: https://cuteepatooties.com/women-building-working-relationships-one-year-anniversary/

    “Parse error: syntax error, unexpected ‘<‘ in /hermes/bosnaweb04a/b2062/ipg.cuteepatootiescom/home/wp-content/themes/2010-weaver/single.php on line 41”

    I think it is this line of code that is causing the error:
    <?php end if; ?>

    Any advice welcome. I am not a engineer or website master therefore, please reply in very basic, low tech way. Thank you.

    April M. Williams

Viewing 5 replies - 1 through 5 (of 5 total)
  • Often these error messages don’t show the exact line the problem is, they often direct you to a few lines down where the next php line, and point that it’s not what it PHP wants it to be.

    Low tech explanation, it’s like a math equation being.

    5
    +
    7
    +
    2
    +
    Banana
    -------------
    = 16

    PHP would say “error: the answer 16 is not right, there’s a unexpected fruit somewhere“..

    So your error translated is:

    “Syntax error there something wrong above line 41 in single.php. Look for something that would conflict with ‘<‘ being used on line 41”

    Anyways, you have to look up from line 41, read the php and see what’s going on. If I was to guess I’d say there’s a line of PHP above line 41 that’s open (i.e.: doesn’t have semicolon “;” line ending, or doesn’t close PHP ” ?>” )

    If this doesn’t shed any light, paste lines ~20 to 45 on here, (surround the pasted text in backticks “`” to show it as code instead of plain text)

    or not.

    end if

    should be

    endif

    one word

    Thread Starter aprilmwilliams

    (@aprilmwilliams)

    Thanks for the explanation. I think this is the chunk of code and maybe a partial line is missing? Appreciate your help.


    <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>

    <div id=”nav-above” class=”navigation”>
    <div class=”nav-previous”><?php previous_post_link( ‘%link’, ‘<span class=”meta-nav”>’ . _x( ‘←’, ‘Previous post link’, ‘twentyten’ ) . ‘</span> %title’ ); ?></div>
    <div class=”nav-next”><?php next_post_link( ‘%link’, ‘%title <span class=”meta-nav”>’ . _x( ‘→’, ‘Next post link’, ‘twentyten’ ) . ‘</span>’ ); ?></div>
    </div><!– #nav-above –>

    <div id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
    <h1 class=”entry-title”><?php the_title(); ?></h1>

    <div class=”entry-meta”>
    <?php twentyten_posted_on(); ?>
    </div><!– .entry-meta –>

    <div class=”entry-content”>
    <?php the_content(); ?>
    <?php wp_link_pages( array( ‘before’ => ‘<div class=”page-link”>’ . __( ‘Pages:’, ‘twentyten’ ), ‘after’ => ‘</div>’ ) ); ?>
    </div><!– .entry-content –>

    <?php if ( get_the_author_meta( ‘description’ ) ) : // If a user has filled out their description, show a bio on their entries ?>
    <div id=”entry-author-info”>
    <div id=”author-avatar”>
    <?php echo get_avatar( get_the_author_meta( ‘user_email’ ), apply_filters( ‘twentyten_author_bio_avatar_size’, 60 ) ); ?>
    </div><!– #author-avatar –>
    <div id=”author-description”>
    <h2><?php printf( esc_attr__( ‘About %s’, ‘twentyten’ ),
    <?php endif; ?>

    This theme was customized by the previous webmaster and I an concerned about reinstalling the theme as it will wipe out all these settings.

    the line

    <h2><?php printf( esc_attr__( 'About %s', 'twentyten' ),

    is incomplete. someone must of accidentally deleted the end of the line

    it should have something like

    <h2><?php printf( esc_attr__( 'About %s', 'twentyten' ), get_the_author()  ) ?></h2>
    Thread Starter aprilmwilliams

    (@aprilmwilliams)

    THANK YOU DAVID! Your assistance very much appreciated! By adding the missing segment of code, the single post, well… post. All’s well and working as designed.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Parse error: syntax error, unexpected '’ is closed to new replies.