Forum Replies Created

Viewing 6 replies - 16 through 21 (of 21 total)
  • Thread Starter crisp82

    (@crisp82)

    From what I can see, that is calling posts categorised as ‘Featured’, and listing 10. I am not sure where I can grab the latest 10 from though.

    I tried:

    $latest_id = get_cat_id($woo_options[‘woo_latest_category’]);
    query_posts(“cat=-{$latest_id}&showposts=10”);
    $the_query = new WP_Query(“cat=$feat_id&showposts=$limit”);

    This is not working either.

    I am not sure where the categories are defined. Is there a better way of calling the last 10 posts?

    Thanks

    crisp82

    Thread Starter crisp82

    (@crisp82)

    This doesn’t seem to change the layout. I can see 1 labelled ‘Latest Post’ and then it moves onto the ‘Featured Posts’ section. It seems to be ignoring:

    query_posts($query_string . "&showposts=10");

    ?

    Thread Starter crisp82

    (@crisp82)

    I think I may be inserting the code incorrectly. When added, it displays as it was before.

    Previously, it was this:

    <?php get_header(); ?>
    <?php global $woo_options; ?>
    		<div id="topbanner" class="column span-14" style="background-image:url(<?php header_image(); ?>)">
                <div class="pagetitle">
                    <?php echo $woo_options['woo_pageheading_prefix'] . $woo_options['woo_pageheading_home']; ?>
                </div>
            </div> 
    
            <div id="home_content" class="column span-14">
    
                <div id="home_left" class="column span-10 first">
    
    		<?php if (function_exists(s3slider_show())) { s3slider_show(); } ?>
    
    				<?php
    				while (have_posts()) : the_post();
    
    				$do_not_duplicate = $post->ID; ?>
    
    				<div id="latest_post">
    					<h3 class="mast"><?php _e('Latest Posts','woothemes'); ?></h3
    
    					<div id="latest_post_image">
    					<?php woo_image('width=470&height=210'); ?>
    					</div>
    
    					<h3 class="latest_post_title" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php _e('Permanent Link to','wootheme');?> <?php the_title(); ?>"><?php the_title(); ?></a></h3>
    
    <small>Posted on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?></small>
    
    					<p><?php if ( $woo_options['woo_post_content_home'] == "true" ) the_content(); else the_excerpt(); ?></p>
    
    <small>Filed under <?php the_category(', ') ?>.</small<p></p>				
    
    					<div class="latest_post_meta">
    						<span class="latest_read_on"><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php _e('Continue Reading','woothemes'); ?></a></span>
    						<span class="latest_comments"><?php comments_popup_link('Post a comment', 'One comment', '% comments', '', 'Comments off'); ?></span>
    						<?php $cat = get_the_category(); $cat = $cat[0]; ?>
    						<span class="latest_category"><a href="<?php echo get_category_link($cat->cat_ID);?>"><?php echo $cat->cat_name; ?></a></span>
    					</div>
    				</div>
    
    				<?php
    				break;
    				endwhile; ?>
    
    				<div id="home_featured">
    					<h3 class="home_featured"><?php echo $woo_options['woo_featured_heading']; ?></h3>
    
    					<?php
    					$feat_id = get_cat_id($woo_options['woo_featured_category']);
    					$limit = $woo_options['woo_featured_limit'];
    					$the_query = new WP_Query("cat=$feat_id&showposts=$limit");
    
    					while ($the_query->have_posts()) : $the_query->the_post();
    
    					$do_not_duplicate = $post->ID; ?>
    
    					<div class="feat_content">
    
    						<?php woo_image("width=65&height=65"); ?>
    
    						<div class="feat_title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php _e('Permanent Link to','wootheme');?> <?php the_title(); ?>"><?php the_title(); ?></a></div>
    
    						<div class="feat_exc">
    							<?php if ( $woo_options['woo_post_content_home'] == "true" ) the_content(); else the_excerpt(); ?>
    						</div>
    
    					</div>
    
    					<?php endwhile; ?>
    
    				</div>
    
    				<div id="home_asides">
    
    					<h3 class="mast"><?php echo $woo_options['woo_updates_heading']; ?></h3>
    
    					<ul class="arrow">
    						<?php
    						$limit = $woo_options['woo_updates_limit'];
    						$the_query = new WP_Query("post_type=updates&showposts=$limit");
    
    						while ($the_query->have_posts()) : $the_query->the_post();
    
    						$do_not_duplicate = $post->ID; ?>
    
    						<li><?php echo strip_tags(get_the_content(), '<a>'); ?> <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php _e('Permanent Link to','wootheme');?> <?php the_title(); ?>">#</a></li>
    
    						<?php endwhile; ?>
    					</ul>
    				</div>
                </div>            
    
                <div id="home_right" class="column span-4 last">
                	<?php if(!empty($woo_options['woo_home_heading']) && !empty($woo_options['woo_home_text'])){ ?>
                	<div id="home_about">
    
    					<?php if (!empty($woo_options['woo_home_heading'])) { ?><h3 class="mast3"><?php echo $woo_options['woo_home_heading']; ?></h3><?php } ?>
    					<?php if (!empty($woo_options['woo_home_text'])) { ?><p><?php echo $woo_options['woo_home_text']; ?><p><?php } ?>		
    
    				</div>
    				<?php } ?>
    
    				<div class="column span-4 first">
    
    					<?php if ( !function_exists('dynamic_sidebar')
    					        || !dynamic_sidebar('middle_sidebar') ) : ?>
    
    					<?php endif; ?>
    
                	</div>
    
                    <?php get_sidebar(); ?>         
    
                </div>
    
            </div>    
    
    <?php get_footer(); ?>

    and now:

    <?php get_header(); ?>
    <?php global $woo_options; ?>
    		<div id="topbanner" class="column span-14" style="background-image:url(<?php header_image(); ?>)">
                <div class="pagetitle">
                    <?php echo $woo_options['woo_pageheading_prefix'] . $woo_options['woo_pageheading_home']; ?>
                </div>
            </div> 
    
            <div id="home_content" class="column span-14">
    
                <div id="home_left" class="column span-10 first">
    
    		<?php if (function_exists(s3slider_show())) { s3slider_show(); } ?>
    
    				<?php
            query_posts($query_string . "&showposts=10");
    				while (have_posts()) : the_post();
    
    				$do_not_duplicate = $post->ID; ?>
    
    				<div id="latest_post">
    					<h3 class="mast"><?php _e('Latest Posts','woothemes'); ?></h3>
    
    					<div id="latest_post_image">
    					<?php woo_image('width=470&height=210'); ?>
    					</div>
    
    					<h3 class="latest_post_title" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php _e('Permanent Link to','wootheme');?> <?php the_title(); ?>"><?php the_title(); ?></a></h3>
    
    					<p><?php if ( $woo_options['woo_post_content_home'] == "true" ) the_content(); else the_excerpt(); ?></p>
    
    					<div class="latest_post_meta">
    						<span class="latest_read_on"><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php _e('Continue Reading','woothemes'); ?></a></span>
    						<span class="latest_comments"><?php comments_popup_link('Post a comment', 'One comment', '% comments', '', 'Comments off'); ?></span>
    						<?php $cat = get_the_category(); $cat = $cat[0]; ?>
    						<span class="latest_category"><a href="<?php echo get_category_link($cat->cat_ID);?>"><?php echo $cat->cat_name; ?></a></span>
    					</div>
    				</div>
    
    				<?php
    				break;
    				endwhile; ?>
    
    				<div id="home_featured">
    					<h3 class="home_featured"><?php echo $woo_options['woo_featured_heading']; ?></h3>
    
    					<?php
    					$feat_id = get_cat_id($woo_options['woo_featured_category']);
    					$limit = $woo_options['woo_featured_limit'];
    					$the_query = new WP_Query("cat=$feat_id&showposts=$limit");
    
    					while ($the_query->have_posts()) : $the_query->the_post();
    
    					$do_not_duplicate = $post->ID; ?>
    
    					<div class="feat_content">
    
    						<?php woo_image("width=65&height=65"); ?>
    
    						<div class="feat_title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php _e('Permanent Link to','wootheme');?> <?php the_title(); ?>"><?php the_title(); ?></a></div>
    
    						<div class="feat_exc">
    							<?php if ( $woo_options['woo_post_content_home'] == "true" ) the_content(); else the_excerpt(); ?>
    						</div>
    
    					</div>
    
    					<?php endwhile; ?>
    
    				</div>    
    
    <?php get_footer(); ?>
    Thread Starter crisp82

    (@crisp82)

    Here

    Not sure why that didn’t work before!

    Thread Starter crisp82

    (@crisp82)

    Thanks!

    I receive the following error when loading this though:

    Parse error: syntax error, unexpected T_ENDWHILE in /home/crisp82/public_html/wp-content/themes/themorningafter/home.php on line 43

    The website is

    Thread Starter crisp82

    (@crisp82)

    *Bump

Viewing 6 replies - 16 through 21 (of 21 total)