• 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 https://www.nomadcoder.com/thumbnail-grid-demo/ and https://www.ads-software.com/plugins/autonav/screenshots/ as examples of thumbnail post view). I saw the Template Tags/get posts functionality (here: https://codex.www.ads-software.com/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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ryanbuckley

    (@ryanbuckley)

    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.

    Thread Starter ryanbuckley

    (@ryanbuckley)

    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”.

    https://www.be-hold.com/category/category
    is a parent category to
    https://www.be-hold.com/category/category/contemporary-color
    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') { ?>
    	<ul>
    	<?php wp_list_categories('child_of=$category_id'); ?>
    	</ul>
    <? }
    else {
    /* USER IS ON A SUB-CATEGORY, SO SHOW POSTS */

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Help finding solution’ is closed to new replies.