Forums

Branfordmagazine theme tweak - need advise (3 posts)

  1. greenpeas
    Member
    Posted 2 years ago #

    I'm trying to show the most recent post (category 75 ). It is currently loading the oldest.
    http://www.greenpeas.us/weddings/

    This is the category listing for wedding videos.... note the most recent post is Johnny and Kristin’s Wedding Montage, (this is correct!)

    Recent Weddings in Right Column image Link

    the oldest is Miller-Pryor Wedding Rehearsal, which shows up in the content area for the wedding page.

    <a href="http://www.greenpeas.us/wordpress/wordpress/wp-
    content/uploads/2009/11/content-area.jpg">Content area image link

    from the "featured" page template (lines 20-39):

    <div id="featured-rightcol">
      <h3><?php _e('Recent Weddings','branfordmagazine');?></h3>
       <ul class="bullets">
       <?php $temp_query = $wp_query; ?>
    <?php query_posts('cat=75&showposts=5'); ?>
        <?php while (have_posts()) : the_post(); ?>
      <li><a href='<?php the_permalink() ?>'><?php the_title(); ?></a></li>
    <?php endwhile; ?>
      <?php $wp_query = $temp_query; ?>
       </ul>
    </div>
    
    </div>
    
    <div id="featured-content">
    
      <div class="featured_post" id="post-<?php the_ID(); ?>">
        <h2>
          <?php the_title(); ?>
        </h2>

    I have tried changing the featured-content a little; but can't find a way for it to pull the most recent post in the category 75. Any suggestions on this?
    Thank you!

    (one additional note, when I view the source for the page, it shows:

    <div id="featured-content">
    
      <div class="featured_post" id="post-699">
        <h2>
          Miller-Pryor Wedding Rehearsal    </h2>
    
        <div class="entry">

    Not certai as to why it is pulling the oldest post, rather than newest!)

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Try using <?php query_posts('cat=75&showposts=1'); ?>

  3. greenpeas
    Member
    Posted 2 years ago #

    Thanks for the note esmi,
    here's what I get when I do the:
    http://www.greenpeas.us/images/apple-images/problem1.jpg

    Seems like the number of posts loads in the right column on this particular theme page template, and it affects the content area as well.

    I tried this also on that line,
    <?php query_posts('cat=75&order=ASC&showposts=10'); ?>
    and get these results:

    http://www.greenpeas.us/images/apple-images/problem2.jpg

    This is the closest I have gotten so far, because it loads the most current post in the content area; yet over in the sidebar, this are chronologically backwards. I tried using DESC rather than ASC... it reverses the sidebar posts; but puts the oldest post in content area.

Topic Closed

This topic has been closed to new replies.

About this Topic