WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Image Post Gallery (7 posts)

  1. illusivemind
    Member
    Posted 7 years ago #

    I'm looking for a way to create a gallery of thumbnails that link to all the posts in my 'art' category. I'd like the gallery to be on a page.

    Any ideas?

  2. illusivemind
    Member
    Posted 7 years ago #

    Here's an example of it being done manually:
    http://illusive-mind.com/art/

  3. effbee
    Member
    Posted 7 years ago #

    Yes! I'd really like to be able to do this as well. Does anyone have an idea?

  4. yaasmine
    Member
    Posted 7 years ago #

    Hello,

    I am looking for the same thing.
    Anyone, please help!

    (It would also be nice if the blog title would be displayed)

    Thank You

  5. illusivemind
    Member
    Posted 7 years ago #

    I can't find anything existing on this.
    However, the first step I think would be to associate a thumbnail with the posts you want to link to in one of the custom fields.

  6. Pravin Paratey
    Member
    Posted 7 years ago #

    This can be achieved by creating a separate page template and then linking this template to your page.

    Creating Template
    -----------------

    Something on the lines of -

    <?php get_header() ?>
    
    <!-- This is what we add. Change x to your art category -->
    <?php query_posts("cat=x"); ?>
    <!-- End of add -->
    
    <!-- Insert "The Loop" part of code from index.php  -->
    
    <?php get_sidebar() ?>
    <?php get_footer() ?>

    Creating Page
    -------------
    1, Write -> Page
    2. Give it whatever title you want to ex. "Art Gallery"
    3. On the right side, under Page Template, select the template that you just created.
    4. Publish

  7. Pravin Paratey
    Member
    Posted 7 years ago #

    Alternatively, you can just create a file called category-x.php (where x is the number of your art category) and add the code above to it. This way you don't have to make that page.

    You will have to modify the code for pagination though. This is because the query_posts('cat=x') will show you the first page no matter what /page/ you are on. One way is to not show pagination and just get all posts.

Topic Closed

This topic has been closed to new replies.

About this Topic