• Resolved bespokeordie

    (@bespokeordie)


    I am trying to get the first post on my index page to show up in the section now labeled “featured” on the page although it is coded as “headline.”

    I can tweak the styling and .css if someone can help me with the coding.

    Here is my index.php code:

    <?php get_header(); ?>
    
    	<?php if(!is_paged()) { ?>
    	<style type="text/css">
    <!--
    .style1 {
    	font-weight: bold;
    	font-size: medium;
    }
    -->
        </style>
    
    	<div id="top" class="clearfloat">
    	  <div id="headline">
    	  <div class="title">featured &amp;raquo</div>
    		<?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>
    	  </div>
    
    **MISC CODE REMOVED**	
    
    	<div id="middle" class="clearfloat">
    	<?php $display_categories = array(45,4,7,13,1); $i = 1;
    	foreach ($display_categories as $category) { ?>
    
    	<div id="cat-<?php echo $i; ?>" class="category">
    		<?php query_posts("showposts=1&amp;cat=$category")?>
    		<span class="cat_title"><a href="<?php echo get_category_link($category);?>"><?php single_cat_title(); ?></a></span>
    	</div>
    
    	<?php $i++; ?>
        	<?php } ?>
    
    	</div>
    
    	<?php } ?>
    
    	<div id="bottom" class="clearfloat">
    
    	<div id="front-list">	
    
    <?php
          $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
          query_posts("cat=-5,-6&amp;paged=$page&amp;posts_per_page=5"); ?>
    <?php while (have_posts()) : the_post(); ?>		
    
    	<div class="clearfloat">
    	<div class="title"><a href="<?php the_permalink() ?>" rel="bookmark">
    	  <?php the_title(); ?>
    	</a></div>
    	<div id="metawrap">
    	<h3 class="cat_title"><?php the_category(' | '); ?> &amp;raquo</h3>
    	<div class="meta">[<?php the_time('j M Y') ?> | <?php comments_popup_link('No Comment', 'One Comment', '% Comments');?> | <?php if(function_exists('the_views')) { the_views(); } ?>]</div>
    	</div>
    	<div class="spoiler">
    	<?php	$values = get_post_custom_values("Image");
    	if (isset($values[0])) { ?>
          <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
    	<img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=<?php echo get_option('home'); ?>/<?php
    $values = get_post_custom_values("Image"); echo $values[0]; ?>&amp;w=300&amp;h=150&amp;zc=1&amp;q=100"
    alt="<?php the_title(); ?>" class="left" width="300px" height="150px"  /></a>
          <?php } ?>
    
    	<?php excerpt('40'); ?>
    	</div>
    	</div>
    
          <?php endwhile; ?>
    
    	<div class="navigation">
    		<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
    			else { ?>
    
    			<div class="right"><?php next_posts_link('Next Page &raquo;') ?></div>
    			<div class="left"><?php previous_posts_link('&laquo; Previous Page') ?></div>
    			<?php } ?>
    
    	</div>
    	</div>
    
    	<?php get_sidebar(); ?>
    
    	</div>	
    
    <?php get_footer(); ?>
  • The topic ‘Help me with my .php problem?’ is closed to new replies.