Identical index.php changes in identical sites deliver differing outcomes
-
I am adding category blocks to the frontpage of my main site. The theme’s dev team said they can only advise to copy and paste a block div in the index.php and just change the category options. ie change block4cat to business, if I wanted a new block modelled off of block four to be for the business category.
This actually worked in the test site. So I just copied it over to the mainsite but it is not working. The title says “Travel” but the content is the latest posts.
Here is the website: burdekintribune.com
Here is the div in question:
<div id="colorcontentblock" class="colorcontentwrap8_left"> <?php $b9_cat = of_get_option('block9cat'); ?> <?php /* Category credentials */ $category_id = $travel; $category_link = get_category_link( $category_id ); $category_name = get_cat_name($category_id); ?> <?php query_posts('showposts=1&offset=0&cat=' . $category_id); if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div id="colorcontenth3_small" class="custom9"><a>" title="<?php echo $category[0]->category_nicename; ?>"><?php echo of_get_option('travel', 'travel'); ?></a></div> <div id="colorcontentwrap9"> <h3><a>" rel="bookmark"><?php the_title(); ?></a></h3> <?php if(get_option('thumbok')!="no"):?> <?php if( has_post_thumbnail() ) { ?> <a>"><?php the_post_thumbnail('colorcontentblock9'); ?></a> <?php } else { ?> <a>"> <img src="<?php bloginfo('template_directory'); ?>/images/noimg.png" style="width:320px; height:190px;" /> </a><?php } ?> <?php endif?> <?php if(get_option('thumbok')!="yes"):?> <?php $m_scrp = get_template_directory_uri() . '/includes/timthumb.php?'; $m_image = ''; $customfields = get_post_custom(); if (empty($customfields['image'][0])) { $m_image = m_theme_capture_first_image(); } else { $m_image = $customfields['image'][0]; } if (empty($m_image)) { $imgpath = $m_image_def; } else { $imgpath = $m_scrp . 'src=' . $m_image . '&w=' . 320 . '&h=' . 190 . '&zc=1'; } ?> <a>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"> <img src="<?php echo $imgpath; ?>" alt="" /> </a> <?php endif?> <?php $excerpt = get_the_excerpt(); echo string_limit_words($excerpt,21); ?>.. <div class="cb"></div> </div> <?php endwhile; ?> <?php else : ?> <?php endif; ?> <?php query_posts('showposts=3&cat=travelcat'.of_get_option('travelcat').'&offset=1'); if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div id="colorcontentwrap9"> <h2><a>" rel="bookmark"><?php the_title(); ?></a></h2> <div class="cb"></div> </div> <?php endwhile; ?> <?php else : ?> <?php endif; ?> </div>
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been damaged by the forum’s parser.]
So how can I go about fixing this issue? I have been chopping and changing for about 20 hours now and nothing.
Also, I’m not well versed in coding and all that jazz, so please speak as if I were a small child or golden retriever.
- The topic ‘Identical index.php changes in identical sites deliver differing outcomes’ is closed to new replies.