WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

some of my post is shown well(like http://exam.downloadkaran.com/?p=453) but another post is not shown well(like http://exam.downloadkaran.com/?p=258)!!! i don't know exactly what should i have to search for. would u please to help me to find a clue. where to start to find my bug. i compare two file but find no mistake all div and other tag are closed well. in some post the problem is solved when i remove

 <?php the_tags(__(' ','dnld'), __(', ','dnld'), __('','dnld')); ?>

but in another one no. it is so complex situation!!! my single.php is here:

                <?php include (TEMPLATEPATH . "/sevenmid.php"); ?>

        <div class="midpostbody post">
             <div class="postheader">
                    <a  href="<?php the_permalink();?>"><?php the_title();?></a>
                </div><!--End post header-->

                <div class="view"><span><?php if(function_exists('the_views')) {   the_views(); } ?></span></div>
                <div class="category"><span><?php the_category(','); ?></span><a href="#">نرم افزار</a></div>
                <div class="clear"></div>    
            <div class="postimg"> <?php if(has_post_thumbnail()){ the_post_thumbnail();} else {?>
                <img  src="<?php bloginfo('template_directory'); ?>/images/Koala.jpg"  alt="<?php the_title();?>" />
              <?php }?>
               <div class="customsize">
                <?php if(get_post_custom_values('sizelabel')) : ?>
                    <span><?php echo get_post_meta($post->ID, 'sizelabel',true); ?>&nbsp;|</span>
                    <?php endif; ?>
                   <?php if(get_post_custom_values('size')) : ?>
                    <span> <?php echo get_post_meta($post->ID, 'size',true); ?></span>
                    <?php endif; ?>
               <div id="sincontent">
                <?php the_content(); ?>
                <div id="postdata">
                    <div id="sharepic"><img src="<?php bloginfo('template_directory'); ?>/images/sharep.png" alt="share here." /></div>
                    <div id="postsocial">
                            <li><a href="#"><img src="<?php bloginfo('template_directory'); ?>/images/cloob.png" alt="cloob" /></a></li>
                            <li><a href="#"><img src="<?php bloginfo('template_directory'); ?>/images/twitter.png" alt="cloob" /></a></li>                              <li><a href="#"><img src="<?php bloginfo('template_directory'); ?>/images/facebook.png" alt="cloob" /></a></li>                             <li><a href="#"><img src="<?php bloginfo('template_directory'); ?>/images/google.png" alt="cloob" /></a></li>                               <li><a href="#"><img src="<?php bloginfo('template_directory'); ?>/images/technorati.png" alt="cloob" /></a></li>                               <li><a href="#"><img src="<?php bloginfo('template_directory'); ?>/images/delicious.png" alt="cloob" /></a></li>                                                            <li><a href="#"><img src="<?php bloginfo('template_directory'); ?>/images/friendfeed.png" alt="cloob" /></a></li>
                    </div><!--End postsocial-->
                        <div id="tabs">
                               <li> <a href="#tabs-3">لینک های دانلود</a></li> 
                                <li> <a href="#tabs-1">راهنمای دانلود</a></li>
                                <li> <a href="#tabs-2">راهنمای نصب</a></li>

                                <li> <a href="#tabs-4">مشخصات</a></li> 
                                <li> <a href="#tabs-5">سیستم مورد نیاز</a></li>                       
                            <div id="tabs-1">
                      <?php if(get_post_custom_values('direct')) : ?>

                                <span> <?php echo get_post_meta($post->ID, 'size',true); ?>&nbsp;|&nbsp;</span>
                                <span> <?php echo get_post_meta($post->ID, 'direct',true); ?></span>

                      <?php endif; ?>

                      <?php if(get_post_custom_values('link')) : ?>
                              <span> <?php echo get_post_meta($post->ID, 'linksize',true); ?>&nbsp;|&nbsp;</span>
                                <span> <?php echo get_post_meta($post->ID, 'link',true); ?></span>

                      <?php endif; ?>
                                yes this is
                               <br />
                               <br />
                               and don't be affriad of them.!!!

                            <div id="tabs-2" style="display:none;"><p>
                            <?php if(get_post_custom_values('downguid')) : ?>
                                <p> <?php echo get_post_meta($post->ID, 'downguid',true); ?></p>

                            <?php endif; ?>yes
                            <div id="tabs-3" style="display:none;"><p >
                            <?php if(get_post_custom_values('installguid')) : ?>
                                <span> <?php echo get_post_meta($post->ID, 'installguid',true); ?></span>
                            <?php endif; ?>                                
                            <div id="tabs-4" style="display:none;"><p >
                            <?php if(get_post_custom_values('properties')) : ?>
                                <span> <?php echo get_post_meta($post->ID, 'properties',true); ?></span>
                            <?php endif; ?>                                                                
                            <div id="tabs-5" style="display:none;">
                            <?php if(get_post_custom_values('requiresys')) : ?>
                                <span> <?php echo get_post_meta($post->ID, 'requiresys',true); ?></span>
                            <?php endif; ?>                                  

                     </div><!--End tab-->
                     <div id="errorpost">
                        <p>رمز کلیه فایل ها <strong>wwww.downloadkaran.com</strong>می باشد.</p>
                        <div><a>گزارش خرابی لینک</a></div>
                     </div><!--End error post-->
                </div><!--End postdata-->

                <div class="downsize"></div>

                <div class="clear"></div>
                <div class="label">
                        <strong>برچسب ها:</strong>

                <?php the_tags(__(' ','dnld'), __(', ','dnld'), __('','dnld')); ?>  
                </div><!--end label-->
                <div class="clear"> </div>
                <div class="date"><span><?php the_time(__('j / F / Y','kubrick')) ?></span></div>
                <div class="comment"><?php comments_popup_link(__('&#1576;&#1583;&#1608;&#1606; &#1606;&#1592;&#1585;'), __('1 &#1606;&#1592;&#1585;'), __('% &#1606;&#1592;&#1585;')); ?></div>
                <div class="clear"></div>
                </div><!--End midpostbody post -->
            <!--Real Post section-->
//for use in the loop, list 5 post titles related to first tag on current post
$tags = wp_get_post_tags($post->ID);
if ($tags) {

$first_tag = $tags[0]->term_id;
'tag__in' => array($first_tag),
'post__not_in' => array($post->ID),

$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {?>
             <div class="midpostbody post">
                <div class="postheader">
                    <a  >پست های مشابه</a>
                </div><!--End post header-->
 <div id="related">
while ($my_query->have_posts()) : $my_query->the_post(); ?>
  <li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to  <?php the_title_attribute(); ?>"><h2><?php the_title(); ?></h2></a></li>
  <br />
     </div><!--End related section-->
    <?php   wp_reset_query();

             <div id="shop" class="midpostbody">
                                    <div id="gallery-wrap">
                  <ul id="gallery">
                 <?php  $tmp_query = new WP_Query('cat='.get_cat_ID('فروشگاه'));
                     while ( $tmp_query->have_posts() ) : $tmp_query->the_post();?>
                             <?php the_post_thumbnail();?> 
                            <br />
                                <a href="<?php the_permalink();?>"><?php the_title(); ?></a>
                             <div><a href="#">خرید پستی</a></div>
                     <?php endwhile; wp_reset_query(); ?>
                  </ul><!--End gallary ul-->
                  </div><!--End gallery-wrap-->

                  <div id="gallery-controls">
                   <a href="#" id="gallery-next"></a>
                    <a href="#" id="gallery-prev"></a>

                </div><!--End gallery controls-->
             </div><!--End shop-->
             <div id="signin" class="midpostbody">
                <img src="<?php bloginfo('template_directory'); ?>/images/group-poste-sabet.jpg" alt="عضویت در آرمان" />
                    مزیت های عضویت در آرمان دانلود :
                    <li> » دریافت آخرین مطالب جذاب منتشر شده در سایت</li>
                    <li> » مشاهده آخرین مطالب خواندنی و جذاب منتشر شده در انجمن</li>
                    <li>» دریافت آخرین عکس های اضافه شده به گالری عکس پس زمینه</li>
                    <li> » ارسال مطالب تاثیر گذار و متفاوت از سراسر دنیای وب فارسی و انگلیسی</li>
                    <li>» هر هفته منتظر طالع خودتان باشید و آن را در ایمیل تان مشاهده کنید</li>
                    <li> » اطلاع از جذاب ترین مطالب شبکه های اجتماعی و سایت های خبری</li>
                    <li>» دریافت آخرین مطالب و عکس های مد و فشن ایرانی و خارجی</li>
                    <li>» جدیدترین فیلم ها و عکس های منتشر شده در دنیای اینترنت</li>
                    <li> » آخرین خبرهای هنری و اقتصادی و تکنولوژی….</li>
                    <li>» و در انتها پیشنهاد های ویژه ما که فقط مخصوص اعضا می باشد  </li>
                <div><a href="#"></a></div>
             </div><!--ٍEnd signin Section-->
                 <?php include (TEMPLATEPATH . "/comments.php"); ?>
   </div><!--End midpannel--> 

            <?php include (TEMPLATEPATH . "/sidebar-left.php"); ?>
        <div class="clear"></div>

        <div id="bottom" ></div><!--End bottom section-->
    </div><!--End content section-->
            </div><!--End outer section-->
            include(TEMPLATEPATH . "/footer.php");
share|improve this question
Please describe what, exactly, isn't displaying properly: what do you expect to see, and don't see - or what do you see unexpectedly? – Chip Bennett Aug 25 '13 at 13:21

I would check the post content of the post that is not shown well for unclosed or unopened <div>, <span>, whatever elements. If you are using Firefox, CMD+U (or Ctrl+U) will show you the source code that - for example - shows unopened but closed <a> and <p> tags in lines 853, 878... also w3c validation would be a good idea.

But, please... nothing happens "for no reason"... ;)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.