WordPress.org

Ready to get started?Download WordPress

Forums

Modifying The Columnist (2 posts)

  1. curasian
    Member
    Posted 1 year ago #

    Hi, I have installed The Columnist (http://thecolumnist.info/) theme on my WP site. Could someone please share with me on:

    How to replace the thumbnail image on the top left with a static image. In the original theme, the left panel shows the most recent post. However, I have modified it to show just the blog title and description. How do I add a logo to the thumbnail image on top left?

    In the original theme, posts are organized by categories. How do I modify it to show the most recent posts arranged by chronological order, and not category?

    Any help will be much appreciated. Thank you.

  2. curasian
    Member
    Posted 1 year ago #

    This is the code that displays the posts. How do I change it from displaying posts by category to just displaying the most recent posts?

    <div id="older-posts">
    	<?php
      $catQuery = $wpdb->get_results("SELECT * FROM $wpdb->terms AS wterms INNER JOIN $wpdb->term_taxonomy AS wtaxonomy ON ( wterms.term_id = wtaxonomy.term_id ) WHERE wtaxonomy.taxonomy = 'category' AND wtaxonomy.parent = 0 AND wtaxonomy.count > 0");
    
      $catCounter = 0;
    
      foreach ($catQuery as $category) {
    
      $catCounter++;
    
      $catStyle = '';
      if (is_int($catCounter / 2)) $catStyle = ' class="catAlt"';
    
      $catLink = get_category_link($category->term_id);
    
      echo '<div class="category">';
    		echo '<h2><a href="'.$catLink.'" title="'.$category->name.'">'.$category->name.'</a></h2>';
    
    		query_posts('cat='.$category->term_id.'&showposts=1');?>
    
    		<?php while (have_posts()) : the_post(); ?>
    		<div class="thumbnail">
    				<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>">
                        <h3><?php the_title(); ?></h3>
                        <?php //get thumnbnail (custom field) ?>
    					<?php $image = get_post_meta($post->ID, 'thumbnail', true); ?>
                        <img src="<?php echo $image; ?>" title="<?php the_title(); ?>" />
                        <?php the_post_thumbnail(); ?>
                    </a>
    		</div>
    		<div class="excerpt">
    				<?php the_excerpt(); ?>
            <a class="more-link" href="<?php the_permalink() ?>" title="Continue reading">Continue reading →</a>
    		</div>
    		<p class="view-all"><a href="<?php echo $catLink; ?>" title="<?php echo $category->name; ?>">View all</a></p>
      </div>
      <?php endwhile; ?>
    
      <?php }	?>
    </div><!--- #older-posts --->

Topic Closed

This topic has been closed to new replies.

About this Topic