Jump to content

borisdollar

New Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by borisdollar

  1. Interesting. That may be a plan! Will take a look now and let you know how I get along. Many thanks for the reply.
  2. Hi, i'm new here and probably a bit out of my depth with PHP. I'll try to explain my problem as best as I possibly can. I have a Wordpress theme which has a section for creating a portfolio. I have populated the portfolio with various images, and the images are split into categories. For arguments sake, lets call them Category1, Category2, Category3 (all the way up to Category7). The portfolio also has a filter which allows the user to select "Category2" and then only images in Category2 will be shown. Nothing too clever there. However, I had to split the portfolio into 2 separate portfolios, quite simply because I have too many categories to filter. So to cut a long story short, I have 2 portfolios. Portfolio1 contains categories1/2/3/4/5 and Portfolio2 contains categories6/7. This works fine, except for the filter. Lets take Portfolio2 for example. It correctly only shows images in Category6 and Category7. But the filter at top has all the categories listed there, when really I only want the filter to show Category6 and Category7. I've pinpointed the code in portfolio.php that controls these filters and this is what it is: <h2><a class="catlink" href="#filter=*" rel="nofollow">Show All</a> <?php $categories = get_terms("portfoliocategory"); foreach ($categories as $category) { $entrycategory = str_replace(',','',str_replace('.','',$category->name)); echo '<a class="catlink" href="#filter=.'.$entrycategory .'" rel="nofollow">'.$category->name.'</a>'; } ?> </h2> So the code above shows filters for all categories. How can I show filters for just the 2 categories? Your help would be much appreciated. Thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.