WordPress.org

Ready to get started?Download WordPress

Forums

Grid-view plugin for WordPress like effect in MightyGoods.com (5 posts)

  1. btlewand
    Member
    Posted 7 years ago #

    Is anyone aware of a plugin that does the same effect which is done in MoveableType for MightyGoods.com?

    LIST
    http://www.mightygoods.com/items/food-and-drink/?view=list

    GRID
    http://www.mightygoods.com/items/food-and-drink/?view=grid

  2. Ajd777
    Member
    Posted 7 years ago #

    This would be done in the theme itself with an if else statement inside the loop.

    Anything related to displaying posts is done by the theme itself.

    To get you started to have the posts in two columns. (Of Course you need to apply widths to the tables and ensure you have an even number of posts displayed)

    Before the loop add:

    <table>

    Inside Loop add:
    `
    <?php

    if($x == 0){
    echo '<tr><td>';
    ?>
    Add Content of loop here
    <?php
    echo '</td>';
    $x =1;

    }else{

    echo '<td>';
    ?>

    Add Content of loop here
    <?php
    echo '</td></tr>';
    $x = 0;
    }

    ?>
    '
    After Loop add
    '
    </table>'

  3. btlewand
    Member
    Posted 7 years ago #

    Thanks so much, I will try it out.

  4. btlewand
    Member
    Posted 7 years ago #

    Since I am not a php programmer, I am having trouble understanding how to insert the code above?

    Which theme file should it go into? How is the code executed (i.e. manually by link, automatically)?

    Basically when a catogory was selected and all of the posts in that category were shown, the picture in each post show up in the grid?

    Is there a solution for this? I believe there is a plugin for this in Moveable Type but nobody has attempted for WordPress.

  5. davidchait
    Member
    Posted 7 years ago #

    I mean, while it's possible to try and hack this via a plugin, it really is the template system handling it. The only movable type plugin I quickly found searching on 'grid' just helped build table-based cells of data -- you'd still have to customize the output to grab certain data fields to show.

    I've done custom-built stuff before (at high rates!) that implements outputting some embedded image in the post (either in post content or in custom post fields), plus some other data, as the index.php main listing.

    It would go in index.php, most likely.

    -d

Topic Closed

This topic has been closed to new replies.

About this Topic