Title: salsool's Replies | WordPress.org

---

# salsool

  [  ](https://wordpress.org/support/users/salsool/)

 *   [Profile](https://wordpress.org/support/users/salsool/)
 *   [Topics Started](https://wordpress.org/support/users/salsool/topics/)
 *   [Replies Created](https://wordpress.org/support/users/salsool/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/salsool/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/salsool/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/salsool/engagements/)
 *   [Favorites](https://wordpress.org/support/users/salsool/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Blog Name Not Displaying Correctly](https://wordpress.org/support/topic/blog-name-not-displaying-correctly/)
 *  [salsool](https://wordpress.org/support/users/salsool/)
 * (@salsool)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/blog-name-not-displaying-correctly/#post-2506426)
 * **Hi
    I have received a WordPress blog from a company after many arguments about
   delays and issues with it. Can someone please check the below and let me know
   if this is sort of spaghetti code:| its for a tag listing page… also pls advise
   on how to add the pagination to the page am not technical at all but when i was
   checking the pages i felt its very un-flexible code and long for nothing  —————————-
   for paination style here is the code used in another php page <?php /\*\* \* 
   If is_home or is_paged \* include featured.php \* Else, create the regular loop
   for other templates \*/ ?> <?php /\*\* arabic translations \*/ $posted_by = ‘
   أرفق’; $not_found = ‘لم يتم العثور على’; $edit_post = ‘تعديل مشاركة’;
 * ?>
 * <?php $home_is_set = FALSE;?>
    <div id=”sidebar” class=”left widget-area”> <?
   php get_sidebar(); ?> </div> <!– #sidebar –> <div id=”main” class=”right”> <?
   php if(is_home() || is_paged()): ?> <?php $home_is_set = TRUE;?> <?php include(
   TEMPLATEPATH . ‘/featured.php’); ?> <?php // END OF if(is_home() || is_paged()):?
   > <?php elseif (is_tag()) : // For Tag arcvhive page ?> <div id=”content_top”
   > </div> <!– #content_top –>
 *  <h2 class=”title post-tag”><?php
    printf( __( ‘أرشيف: %s’, ‘themex’ ), ‘<span
   >’ . $current_tag = single_tag_title(“”, false) . ‘</span>’ ); ?></h2>
 *  <div id=”post-entry”>
    <?php //$temp = $wp_query; $wp_query= null; $wp_query
   = new WP_Query(‘posts_per_page=&cat=&paged=’ . $paged);?> <?php $postcounter 
   = 0; if ($wp_query->have_posts()) : ?> <?php while ($wp_query->have_posts()) :
   $postcounter = $postcounter + 1; $wp_query->the_post();?> <div class=”post-meta”
   id=”post-<?php the_ID(); ?>”> <div class=”post-info”> <h2 class=”title”>” rel
   =”bookmark” title=”<?php the_title(); ?>”> <?php the_title(); ?> </h2> <div class
   =”post-date”> <?php echo get_the_date();?> | <?php the_author_posts_link(); ?
   ></div>
 *  <!– POST DATE END –>
    <div class=”post-admin”> <!–  on  –> <?php //the_category(‘,‘)?
   > <?php edit_post_link(‘+’.$edit_post); ?> </div> <div class=”clearfix”></div
   > </div> <!– POST INFO END –> <div class=”post-content”> <?php if ( has_post_thumbnail()){?
   > <div class=”thumb”> <?php the_post_thumbnail(array(180,9999), array(‘class’
   => ‘alignleft’)); ?> </div> <?php } else { ?> <?php //get_post_image(); ?> <?
   php } ?> <?php //the_post_excerpt($excerpt_length=50); //the_content(); $newexcerpt
   = get_the_excerpt() ; $newexcerpt = strip_tags( $newexcerpt ) ; echo $newexcerpt;//
   the_excerpt(); ?> <div class=”clearfix”></div> </div> <!– POST CONTENT END –>
   </div> <!– POST META <?php the_ID(); ?> END –>
 *  <?php endwhile; ?>
    <?php else : ?> <p class=”center”><?php echo $not_found;?
   ></p> <p class=”center”>No posts found in above tag!</p> <?php endif; ?> <?php//
   $wp_query = null; $wp_query = $temp; ?> </div> <!– Tag Listing and POST ENTRY
   END –>
 *  <?php else: ?>
    <div id=”content_top”> <?php echo date_i18n(‘l, F j, Y’) ?> 
   </div> <!– #content_top –>
 *  <div id=”post-entry”>
    <?php //$temp = $wp_query; $wp_query= null; $wp_query
   = new WP_Query(‘posts_per_page=&cat=&paged=’ . $paged);?> <?php $postcounter 
   = 0; if ($wp_query->have_posts()) : ?> <?php while ($wp_query->have_posts()) :
   $postcounter = $postcounter + 1; $wp_query->the_post();?> <div class=”post-meta”
   id=”post-<?php the_ID(); ?>”> <div class=”post-info”> <div class=”post-date”>
   <span class=”month”> <?php the_time(‘M’) ?> </span> <span class=”day”> <?php 
   the_time(‘d’); ?> </span> </div> <!– POST DATE END –> <h1 class=”title”>” rel
   =”bookmark” title=”<?php the_title(); ?>”> <?php the_title(); ?> </h1> <div class
   =”post-admin”><?php echo $posted_by;?> <?php the_author_posts_link(); ?>  on 
   <?php the_category(‘, ‘) ?> .   <?php edit_post_link(‘+’.$edit_post); ?> </div
   > <div class=”clearfix”></div> </div> <!– POST INFO END –> <div class=”post-content”
   > <?php if ( has_post_thumbnail() ) { ?> <div class=”thumb”> <?php the_post_thumbnail(
   array(180,9999), array(‘class’ => ‘alignleft’)); ?> </div> <?php } else { ?> 
   <?php //get_post_image(); ?> <?php } ?> <?php //the_post_excerpt($excerpt_length
   =50); //the_content(); $newexcerpt = get_the_excerpt() ; $newexcerpt = strip_tags(
   $newexcerpt ) ; echo $newexcerpt; //the_excerpt(); ?> <div class=”clearfix”></
   div> </div> <!– POST CONTENT END –> </div> <!– POST META <?php the_ID(); ?> END–
   >
 *  <?php endwhile; ?>
    <?php else : ?> <p class=”center”><?php echo $not_found;?
   ></p> <p class=”center”>آسف ، ولكن كنت تبحث عن شيء غير موجود هنا.</p> <?php endif;?
   > <?php //$wp_query = null; $wp_query = $temp; ?> </div> <!– POST ENTRY END –
   >
 *  <?php endif; // if/else is_home || is_paged ?>
    </div> <!– #main –> <div class
   =”clear”><!– –></div> <?php /** * If is_home || is_paged * include authorcarousel*
   Strangely, if is_home is checked here, it is FALSE * So, a new var ($home_is_set)
   is set above to TRUE know if it is_home */ if($home_is_set) { //echo ‘hello’;
   get_template_part(‘authorcarousel’); } ?>
 * ———————————
    <?php /** * If is_home or is_paged * include featured.php * Else,
   create the regular loop for other templates */ ?> <?php /** arabic translations*/
   $posted_by = ‘أرفق’; $not_found = ‘لم يتم العثور على’; $edit_post = ‘تعديل مشاركة’;
 * ?>
 * <?php $home_is_set = FALSE;?>
    <div id=”sidebar” class=”left widget-area”> <?
   php get_sidebar(); ?> </div> <!– #sidebar –> <div id=”main” class=”right”> <?
   php if(is_home() || is_paged()): ?> <?php $home_is_set = TRUE;?> <?php include(
   TEMPLATEPATH . ‘/featured.php’); ?> <?php // END OF if(is_home() || is_paged()):?
   > <?php elseif (is_tag()) : // For Tag arcvhive page ?> <div id=”content_top”
   > </div> <!– #content_top –>
 *  <h2 class=”title post-tag”><?php
    printf( __( ‘أرشيف: %s’, ‘themex’ ), ‘<span
   >’ . $current_tag = single_tag_title(“”, false) . ‘</span>’ ); ?></h2>
 *  <div id=”post-entry”>
    <?php //$temp = $wp_query; $wp_query= null; $wp_query
   = new WP_Query(‘posts_per_page=&cat=&paged=’ . $paged);?> <?php $postcounter 
   = 0; if ($wp_query->have_posts()) : ?> <?php while ($wp_query->have_posts()) :
   $postcounter = $postcounter + 1; $wp_query->the_post();?> <div class=”post-meta”
   id=”post-<?php the_ID(); ?>”> <div class=”post-info”> <h2 class=”title”>” rel
   =”bookmark” title=”<?php the_title(); ?>”> <?php the_title(); ?> </h2> <div class
   =”post-date”> <?php echo get_the_date();?> | <?php the_author_posts_link(); ?
   ></div>
 *  <!– POST DATE END –>
    <div class=”post-admin”> <!–  on  –> <?php //the_category(‘,‘)?
   > <?php edit_post_link(‘+’.$edit_post); ?> </div> <div class=”clearfix”></div
   > </div> <!– POST INFO END –> <div class=”post-content”> <?php if ( has_post_thumbnail()){?
   > <div class=”thumb”> <?php the_post_thumbnail(array(180,9999), array(‘class’
   => ‘alignleft’)); ?> </div> <?php } else { ?> <?php //get_post_image(); ?> <?
   php } ?> <?php //the_post_excerpt($excerpt_length=50); //the_content(); $newexcerpt
   = get_the_excerpt() ; $newexcerpt = strip_tags( $newexcerpt ) ; echo $newexcerpt;//
   the_excerpt(); ?> <div class=”clearfix”></div> </div> <!– POST CONTENT END –>
   </div> <!– POST META <?php the_ID(); ?> END –>
 *  <?php endwhile; ?>
    <?php else : ?> <p class=”center”><?php echo $not_found;?
   ></p> <p class=”center”>No posts found in above tag!</p> <?php endif; ?> <?php//
   $wp_query = null; $wp_query = $temp; ?> </div> <!– Tag Listing and POST ENTRY
   END –>
 *  <?php else: ?>
    <div id=”content_top”> <?php echo date_i18n(‘l, F j, Y’) ?> 
   </div> <!– #content_top –>
 *  <div id=”post-entry”>
    <?php //$temp = $wp_query; $wp_query= null; $wp_query
   = new WP_Query(‘posts_per_page=&cat=&paged=’ . $paged);?> <?php $postcounter 
   = 0; if ($wp_query->have_posts()) : ?> <?php while ($wp_query->have_posts()) :
   $postcounter = $postcounter + 1; $wp_query->the_post();?> <div class=”post-meta”
   id=”post-<?php the_ID(); ?>”> <div class=”post-info”> <div class=”post-date”>
   <span class=”month”> <?php the_time(‘M’) ?> </span> <span class=”day”> <?php 
   the_time(‘d’); ?> </span> </div> <!– POST DATE END –> <h1 class=”title”>” rel
   =”bookmark” title=”<?php the_title(); ?>”> <?php the_title(); ?> </h1> <div class
   =”post-admin”><?php echo $posted_by;?> <?php the_author_posts_link(); ?>  on 
   <?php the_category(‘, ‘) ?> .   <?php edit_post_link(‘+’.$edit_post); ?> </div
   > <div class=”clearfix”></div> </div> <!– POST INFO END –> <div class=”post-content”
   > <?php if ( has_post_thumbnail() ) { ?> <div class=”thumb”> <?php the_post_thumbnail(
   array(180,9999), array(‘class’ => ‘alignleft’)); ?> </div> <?php } else { ?> 
   <?php //get_post_image(); ?> <?php } ?> <?php //the_post_excerpt($excerpt_length
   =50); //the_content(); $newexcerpt = get_the_excerpt() ; $newexcerpt = strip_tags(
   $newexcerpt ) ; echo $newexcerpt; //the_excerpt(); ?> <div class=”clearfix”></
   div> </div> <!– POST CONTENT END –> </div> <!– POST META <?php the_ID(); ?> END–
   >
 *  <?php endwhile; ?>
    <?php else : ?> <p class=”center”><?php echo $not_found;?
   ></p> <p class=”center”>آسف ، ولكن كنت تبحث عن شيء غير موجود هنا.</p> <?php endif;?
   > <?php //$wp_query = null; $wp_query = $temp; ?> </div> <!– POST ENTRY END –
   >
 *  <?php endif; // if/else is_home || is_paged ?>
    </div> <!– #main –> <div class
   =”clear”><!– –></div> <?php /** * If is_home || is_paged * include authorcarousel*
   Strangely, if is_home is checked here, it is FALSE * So, a new var ($home_is_set)
   is set above to TRUE know if it is_home */ if($home_is_set) { //echo ‘hello’;
   get_template_part(‘authorcarousel’); } ?>

Viewing 1 replies (of 1 total)