Help finding solution (3 posts)

  1. ryanbuckley
    Posted 1 year ago #

    Hello fellow WordPressers,

    I'm hoping someone can help me determine a solution to our problem of displaying an inventory of items with multiple images and categories.

    We want to display photographs that we have for sale, but don't want to sell them through a shopping cart system (we'd like to be contacted instead). Importantly, each photograph needs to be represented by usually more than one image (the front, the back, a few details...etc). AND more than one category (i.e. Black and White, Landscape, Modernism). Visitors to our site should be able to see a list of categories, and when they click on that category they will see a written text on that theme (sometimes categories will be works by a single photographer) along with thumbnails (with captions...i.e. title and/or photographer). Clicking each thumbnail would take them to a full view with a written description and all available images.

    This is where I've gotten so far: I imagined having this work through posts. Each photograph could be represented by a single post, and could have any number of images attached. For each category, I could see there being a post with descriptive text and shortcode that would display all related posts (via "tags" maybe?), and would show them as thumbnails (I've found http://www.nomadcoder.com/thumbnail-grid-demo/ and http://wordpress.org/plugins/autonav/screenshots/ as examples of thumbnail post view). I saw the Template Tags/get posts functionality (here: http://codex.wordpress.org/Template_Tags/get_posts#Parameters) but am not sure how to have that work with links. (i.e. clicking on a category of "Landscapes" would go to 'posts.php?category=landscapes')

    It all sounds feasible, and it seems like I'm close to getting something workable, but definitely missing the key to bring it all together.

    Any ideas to help me tie this up would be greatly appreciated.

    Many thanks in advance.

  2. ryanbuckley
    Posted 1 year ago #

    Okay, this request was probably a little overwhelming, but i've managed to figure out enough to get me started. I am using categories in conjunction with the "Category Grid View Gallery" plug-in. This way I am able to generate descriptive text and employ a shortcode to display all relevant posts in a thumbnail grid. Hope this helps anyone else looking for a similar solution.

  3. ryanbuckley
    Posted 1 year ago #

    I've got this pretty-much figured out, but now encountering an odd error with wp_list_categories()

    I have it before the loop, and even with categories for which I know there are posts, i still get "No categories".

    is a parent category to
    which, as you can see, does contain posts

    Here is the code for my Categories page, which loads a grid if the visitor is viewing the subcategory (or child), or a list of categories if their on the parent:

    <?php if (is_category())
    $category_id = get_query_var('cat');
    if ($category_id == '27' || $category_id == '24' || $category_id == '23') { ?>
    	<?php wp_list_categories('child_of=$category_id'); ?>
    <? }
    else {


Topic Closed

This topic has been closed to new replies.

About this Topic