Forums

category query AND thumbnailing an image (3 posts)

  1. rudeboyskunk
    Member
    Posted 2 years ago #

    Ok, I have two questions. If either get answered, I'll be a happy camper.

    1) My theme uses multiple columns on the front page to display different categories and previews of posts within those categories. In one of those columns, it takes an image from the post and thrusts it into the preview, overflowing and overlapping onto the sidebar. I've searched and searched for a proper plugin, but none seem to do what I need, no matter how hard I try/tweak. How do I keep the image at its normal size in the post itself while making it shrink down to a thumbnail size for the preview?

    2) I have a column showing "lead articles," which I've just designated as showing the newest post. I've gotten it to work so far, except it will not display the name of the category above the post. It simply says "No Categories" every time. The posts are properly categoried. The php file has this for it:

    <!-- LEAD ARTICLE -->
      <div id="fragment-1">
        <ul id="leadarticle">
          <?php
    // Lead Story module begins
       query_posts('showposts=1&cat='); //selects 1 article of the category with ID 1 ?>
          <?php while (have_posts()) : the_post(); ?>

    So it will show the latest post from ANY category just fine, it just won't give that category's name.

    Any ideas?

  2. ioni
    Member
    Posted 2 years ago #

    I would go and check the_category()

    Please note that it may return a few, so you may want to show only the first category returned (when the post is in a few categories) or a random one at that.

  3. ioni
    Member
    Posted 2 years ago #

    I mean something like that - http://sunshine.by/ check how the columns are generated, is this what you need?

Topic Closed

This topic has been closed to new replies.

About this Topic