nathanmock
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
Forum: Fixing WordPress
In reply to: Show All Recent postsIf possible, I would also like it to show 10 of the most recent posts, and then have a link that will update the page with the 10 succeeding most recent posts. So for example, the first page will show (1-10), second, (11-20), third (21-30), etc.
Forum: Fixing WordPress
In reply to: Show All Recent postsThank you for your help. I got it to work fine, however, I have a few questions. Everything displays fine, but here is how I would like it to be displayed…I want it to show entries as it does on the archive page (using the excerpts, example: https://nathanmock.com/category/art-and-design/), but not have the headline and category hover overs directly underneath it show (example: https://nathanmock.com/subscribe/feeds/).
Here is the code for the archive.php, it may be of help to you.
<?php get_header(); ?> <div id="content" class="archive"> <?php if (have_posts()) : ?> <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?> <?php /* If this is a category archive */ if (is_category()) { ?><span id="map"><a href="<?php echo get_option('home'); ?>/">Home</a> » Archive by Category</span> <h2 class="title">Articles in the <strong><?php single_cat_title(); ?></strong> Category</h2> <?php /* If this is a tagged archive */ } elseif (is_tag()) { ?><span id="map"><a href="<?php echo get_option('home'); ?>/">Home</a> » Archive by Tags</span><h2 class="title">Articles tagged with: <strong><?php single_tag_title(); ?></strong></h2> <?php /* If this is a daily archive */ } elseif (is_day()) { ?><span id="map"><a href="<?php echo get_option('home'); ?>/">Home</a> » Archive by Day</span><h2 class="title">Articles Archive for <strong><?php the_time('j F Y'); ?></strong></h2> <?php /* If this is a monthly archive */ } elseif (is_month()) { ?><span id="map"><a href="<?php echo get_option('home'); ?>/">Home</a> » Archive by Month</span><h2 class="title">Articles Archive for <strong><?php the_time('F Y'); ?></strong></h2> <?php /* If this is a yearly archive */ } elseif (is_year()) { ?><span id="map"><a href="<?php echo get_option('home'); ?>/">Home</a> » Archive by Year</span><h2 class="title">Articles Archive for <strong>Year <?php the_time('Y'); ?></strong></h2> <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> <span id="map"><a href="<?php echo get_option('home'); ?>/">Home</a> » Archive</span> <h2 class="title">The Archives</h2> <?php } ?> <div class="clearfloat"> <?php while (have_posts()) : the_post(); ?> <div class="tanbox left"> <span class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></span> <div class="meta"><?php the_time('l, j M, Y') ?> <?php the_time('G:i') ?> | <?php comments_popup_link('No Comment', 'One Comment', '% Comments');?></div> <?php $width = get_settings ( "cp_thumbWidth_Archive" ); $height = get_settings ( "cp_thumbHeight_Archive" ); if ( $width == 0 ) { $width = 80; } if ( $height == 0 ) { $height = 80; } ?> <?php $status = get_settings ( "cp_thumbAuto" ); if ( $status != "first" ) { ?> <?php //Check if custom field key "Image" has a value $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=<?php echo $width; ?>&h=<?php echo $height; ?>&zc=1&q=100" alt="<?php the_title(); ?>" class="left" width="<?php echo $width; ?>px" height="<?php echo $height; ?>px" /></a> <?php } ?> <?php } else { ?> <?php $id =$post->ID; $the_content =$wpdb->get_var("SELECT post_content FROM $wpdb->posts WHERE ID = $id"); $pattern = '!<img.*?src="(.*?)"!'; preg_match_all($pattern, $the_content, $matches); $image_src = $matches['1'][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 if($image_src != '') { echo $image_src; } ?>&w=<?php echo $width; ?>&h=<?php echo $height; ?>&zc=1&q=100" alt="<?php the_title(); ?>" class="left" width="<?php echo $width; ?>px" height="<?php echo $height; ?>px" /></a> <?php } ?> <?php the_excerpt(); ?> </div> <?php endwhile; ?> </div> <div id="navigation"> <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?> </div> <?php else : ?> <span id="map"><a href="<?php echo get_option('home'); ?>/">Home</a> » Archive</span> <h2 class="title">Not Found</h2> No posts found. Try a different search? <?php endif; ?> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
Viewing 2 replies - 1 through 2 (of 2 total)