• Resolved bespokeordie

    (@bespokeordie)


    Hello!

    I am trying to learn, WordPress, .php, and .css all at the same time. I work in fnance and have absolutely no web background other than just what I have learn via curiosity and messing with Flash through the years. I have taken the Arthemia free theme and customized it, but would like to change the functionality a little and this have proven to be WAY beyond my knowledge. Would anyone or could anyone help me figure out how to make my first post show up in the “Headline” category section and then the previous posts all show up in the body below? I would like to keep the “Featured” category section for now.

    As of right now, in order to get a post in the Headline section I have to tag it Headline, but then it does not show up subsequently in the body of the page unless I change the category.

    You can find my site here: https://www.bespokeordie.com

    Here is the index page code that I cannot seem to figure out:

    <?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">
    		<img src="<?php echo get_option('home'); ?>/wp-content/themes/bespokeordie/images/headline.png" width="75px" height="21px" alt="" />
    		<?php query_posts("showposts=1&category_name=Headline"); ?>
    		<?php while (have_posts()) : the_post(); ?>	
    
    	<div class="title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div>
    
    	<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>
    	<?php $values = get_post_custom_values("Headline");?>
     	<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]; ?>&w=150&h=150&zc=1&q=100"
    alt="<?php the_title(); ?>" class="left" width="150px" height="150px"  /></a>
    	<?php the_excerpt(); ?>
    	<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">Read the full story &raquo;</a>
    	<?php endwhile; ?>
    	  </div>
    
    	<div id="featured">
    
    	<img src="<?php echo get_option('home'); ?>/wp-content/themes/bespokeordie/images/featured.png" width="75px" height="20px" alt="" />
    	<?php query_posts("showposts=2&category_name=Featured"); $i = 1; ?>
    
          <?php while (have_posts()) : the_post(); ?>
    	<div class="clearfloat">
    	<?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]; ?>&w=100&h=85&zc=1&q=100"
    alt="<?php the_title(); ?>" class="left" width="100px" height="85px"  /></a>
          <?php } ?>
    	<div class="info"><a href="<?php the_permalink() ?>" rel="bookmark" class="title"><?php the_title(); ?></a>
    <?php the_excerpt(); ?>
    </div>
       	  </div>
    
          <?php endwhile; ?>
    
    	</div>
    
    </div>	
    
    	<div id="middle" class="clearfloat">
    	<div align="left"><img src="/images/category.png" class="clearfloat" alt="" />
    
    	</div>
    	<div class="clearfloat style1">
    	<div id="twitter_div">
    <h2 align="left" style="display: none;" >Twitter Updates</h2>
    
      <div align="left">
        <ul id="twitter_update_list">
        </ul>
      </div>
    	</div>
    
          <div align="left">
            <script type="text/javascript" src="https://twitter.com/javascripts/blogger.js"></script>
            <script type="text/javascript" src="https://twitter.com/statuses/user_timeline/xxx.json?callback=twitterCallback2&count=1"></script>
    
          </div>
    	</div>
    
    	</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&paged=$page&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>
    	<h3 class=cat_title><?php the_category(' | '); ?> &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 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]; ?>&w=150&h=150&zc=1&q=100"
    alt="<?php the_title(); ?>" class="left" width="150px" height="150px"  /></a>
          <?php } ?>
    
    	<?php the_excerpt(); ?>
    	</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(); ?>

    Thank you so much for helping!! I have literally spent days trying to figure this out.

    Oh and PS for some reason the timthumb.php file will not work at all on my server despite me verifying that all the required elements are there. The script will just now run at all.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter bespokeordie

    (@bespokeordie)

    Would it help if I said “pretty please?”

    Thread Starter bespokeordie

    (@bespokeordie)

    Am I asking too much? I thought it would be an easy thing for someone who knows .php well. Was I wrong?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘php script help? I am still learning, well trying to…’ is closed to new replies.