Related Posts by Category
[resolved] display as row or grid? (3 posts)

  1. deepbevel
    Posted 4 years ago #

    Hi, love this plugin. Is there a way display as a row or a grid? I'm using thumbs and the list get's pretty long. Thanks!


  2. deepbevel
    Posted 4 years ago #

    I don't exactly know what I'm doing but I got this to work, it shows post thumbnails and titles from the current category in a row instead of a list. I'm using it in loop.single, in the twentyten theme: after

    </div><!-- #post-## -->

    but before

    <?php endwhile; // end of the loop. ?>

    [code moderated - please use the pastebin]

    this is the css I peiced together:

    .header_thumbs {
        float: left;
        margin: 5px;
        overflow: hidden;
        width: 25%;

    limiting the width forces a row.

    The problem is (other than extra mark up no doubt) ..it doesn't omit the current post.
    Anyway, just wondered if anyone knows a way to use css to do the same with the plugin's output, or perhaps make this code leave out the current post. I tried but I got lost quick, any help would be great.

    Here's a link to a page using the above code, I'm using it as a way to get category specific navigation in the form of a thumbnail gallery below each post, doesn't look so great as a list, hence my issue with the plugin.

  3. deepbevel
    Posted 4 years ago #

    solved, I didn't have the exclude right:

    $header_thumbs = get_posts('numberposts=4&exclude=' . $GLOBALS['current_id']= $post->ID . '&category='. $category->term_id );

    full code and demo:

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic