WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Show title and thumbnails only for category page (8 posts)

  1. callender
    Member
    Posted 3 years ago #

    Hi all,

    I want to display only the title and thumbnails only for a particular category page.

    How do i do this?

    Do I edit the category loop in content-extensions.php to say if a certain category display only title and thumbnail image.

    If you can provide code example that would be great.

    BTW I am using the themematic theme.

    Thank you,

    Jim

  2. forunner
    Member
    Posted 3 years ago #

    hi jim,

    query_post could be a good solution

    use the query, and modify your loop to show only the title and thumbnails

  3. callender
    Member
    Posted 3 years ago #

    Many thanks for your reply forunner.

    As I am not a expert php dev could you provide an example of code?

    eg: If cat id8, return title and thumbnail only.

    This goes into the category loop.

    http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail

    Many thanks!

    Jim

  4. forunner
    Member
    Posted 3 years ago #

    quote from the codex :

    <?php
    
    //The Query
    query_posts('cat=8');
    
    //The Loop
    if ( have_posts() ) : while ( have_posts() ) : the_post();
     the_title();
     the_post_thumbnail();   // I'm not sure for this one, try to look into the codex
    endwhile; else:
     ..
    endif;
    
    //Reset Query
    wp_reset_query();
    
    ?>

    hope this will work for you, but I don't know, I'm a beginner too

  5. callender
    Member
    Posted 3 years ago #

    thanks forunner. I ended up using the ref here:

    http://codex.wordpress.org/Function_Reference/the_post_thumbnail

    <div id="post-<?php the_ID(); ?>" class="<?php thematic_post_class(); ?>">
    				<div class="entry-content">
    				<?php the_post_thumbnail('thumbnail'); ?>
     				</div>
  6. forunner
    Member
    Posted 3 years ago #

    good :p

  7. Subhramani
    Member
    Posted 3 years ago #

    One question, wouldnt this bring up posts one below another?

    Since its just titles and its respective thumbnails, I want it to appear in two columns. Any idea how I can get that?

  8. jukooz
    Member
    Posted 3 years ago #

    This should help You.

Topic Closed

This topic has been closed to new replies.

About this Topic