Viewing 1 replies (of 1 total)
  • Thread Starter sydneywebsites

    (@sydneywebsites)

    If you go to my homepage:

    https://ivyvintage.com/ and under the “Latest Photos” there are some thumbnails. When someone clicks on the image I want them to go to the category of the images post. So for example when someone clicks on the purply coloured shoes I want the link to go to:
    https://ivyvintage.com/gallery-category/shoes/

    and when clicking on the handbag go to:
    https://ivyvintage.com/gallery-category/handbags/

    this is what the code looks like to generate the images at the moment:

    <li><a href="https://ivyvintage.com/gallery-category/"><img src="<?php echo $recent_project_thumb[0]; ?>" alt="<?php the_title(); ?>" width="162" height="100" class="imgstyle" /></a></li>

    Obviously I need to put something in the href section and I have tried everything with no luck. The posts belong to a taxonomy category, this is what functions.php looks like:

    register_taxonomy('gallery_cats','gallery',array(
    		'hierarchical' => true,
    		'labels' => $cat_labels,
    		'query_var' => true,
    		'rewrite' => array( 'slug' => 'gallery-category' ),
    	));

    I would really appreciate your help, thank you!

Viewing 1 replies (of 1 total)
  • The topic ‘Linking to a Taxonomy Category’ is closed to new replies.