Forums

Highlight Current Sub-Category in Single Post (6 posts)

  1. tdevine33
    Member
    Posted 9 months ago #

    I have a photo gallery site that has images categorized as such

    Weddings
    -Wedding Teasers
    -Wedding I
    -Wedding II
    -Wedding III
    Events
    -Event Teasers
    -Event I
    etc.

    When you've viewing a certain sub-category (ie:Portrait Teasers) it is glowing the the category list above the images

    http://www.leapfrogwebmarketing.com/clients/creative_expression/archives/category/portraits/portrait-teasers

    but when you've vieweing a full image it does not work.

    http://www.leapfrogwebmarketing.com/clients/creative_expression/archives/931

    I got it working for only one Category (Mitzvahs) by using this bit of code, but cannot figure out how to make it work for all category / sub-categories.

    http://www.leapfrogwebmarketing.com/clients/creative_expression/archives/1339

    <?php if (in_category('21')){ ?>
    
    	<?php
    		$catsy = get_the_category();
    		$myCat = $catsy[0]->cat_ID;
    		wp_list_categories('child_of=21&orderby=order&title_li=&current_category='.$myCat');
    	?>
    
    <?php } ?>
  2. tdevine33
    Member
    Posted 9 months ago #

    anyone have any thoughts?

  3. bjornhall
    Member
    Posted 9 months ago #

    When on the "full view" of the image. The url changes:
    http://www.leapfrogwebmarketing.com/clients/creative_expression/archives/916
    instead of this category/portraits/portrait-teasers (which is used on the thumbnail page)
    Are the "full view" pages posted in the same category?

  4. tdevine33
    Member
    Posted 9 months ago #

    yes, this is based off of a template from elegant themes.

  5. tdevine33
    Member
    Posted 9 months ago #

    no more ideas?

    I just need to make it so that instead of running for only category '21', it does it for all categories.

  6. bjornhall
    Member
    Posted 9 months ago #

    Have you figured this out? (iƤve been away) but the site seem to have moved now?

Reply

You must log in to post.

About this Topic