WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Added character on posts (3 posts)

  1. windstyles
    Member
    Posted 1 year ago #

    I am having a "}" character show at the top of each of my posts. I know it is coming from my index.php file but I don't know how to correct it on my own. I thought it was the } on line 11, but if I remove that, I get a syntax error.

    Is there any way to fix this problem? Thank you!!

    Code below:

    <?php
    @include("Mobile_Detect.php");
    $detect = new Mobile_Detect();
    if ($detect->isMobile() && isset($_COOKIE['mobile']))
    {
    $detect = "false";
    }
    elseif ($detect->isMobile())
    {
    header("Location:http://m.flow-riteplumbing.com");
    }
    
    ?>
    <?php 
    
    include_once('gravatar.php');
    
    get_header();
    ?>
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    }
    
    <div class="post">
    	 <h3 class="storytitle" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
    	<div class="meta"><?php the_category(',') ?> — <?php the_time('l, F j, Y') ?>  <?php edit_post_link(__('Edit This')); ?></div>
    
    	<div class="storycontent">
    		<?php the_content(__('(Read on ...)')); ?>
    	</div>
    
    	<div class="feedback">
                <?php wp_link_pages(); ?>
                <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
    	</div>
    
    	<!--
    	<?php trackback_rdf(); ?>
    	-->
    
    </div>
    
    <?php comments_template(); ?>
    
    <?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>
    
    <?php posts_nav_link(' — ', __('&laquo; Previous Page'), __('Next Page &raquo;')); ?>
    
    <?php get_footer(); ?>
  2. DJDoubleXL189
    Member
    Posted 1 year ago #

    Get rid of the } after `<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    Not sure why that's there...

  3. windstyles
    Member
    Posted 1 year ago #

    Doh! It was the additional } above the <div class="post">

    Resolved :)

Topic Closed

This topic has been closed to new replies.

About this Topic