plumloopy
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Fixing WordPress
In reply to: Show Specific Portfolio Category on Homepage (Remove "ALL")One more thing. In my themes “portfolio.php” file, I created a hard coded category listing so I could change the order and remove “all.” This was fairly easy since I just looked at the code-behind and copied the resulting UL:
I commented this part out (which dynamically finds and creates the buttons:
<div id="filters"> <a href="#" data-filter="*" class="filter_button filter_current" >All Profiles</a> <?php $categories = get_categories(array('type' => 'post', 'taxonomy' => 'portfolio-category')); foreach($categories as $category) { $group = $category->slug; echo "<a href='#' data-filter='.$group' class='filter_button'>".$category->cat_name."</a>"; } ?>And replaced it with the following. Note that to complete the defaulted category effect, I added the selected class to the category I defaulted to (filter_current):
<div id="filters"> <!-- uncomment to have a button to show ALL profiles --> <!--<a href="#" data-filter="*" class="filter_button filter_current" >All Profiles</a> --> <a href='#' data-filter='.chairholder' class='filter_button'>Chairholder</a> <a href='#' id="researchButton" data-filter='.research' class='filter_button filter_current'>Research Team</a> <a href='#' data-filter='.collaborating-professors' class='filter_button'>Collaborating Professors</a> <a href='#' data-filter='.alumni' class='filter_button'>Alumni</a> </div>class=’filter_button filter_current’
Forum: Fixing WordPress
In reply to: Show Specific Portfolio Category on Homepage (Remove "ALL")Found it. In my theme, Builder, it is found in the custom.js file, here:
// initialize isotope $container.isotope({ itemSelector : '.block', layoutMode : 'fitRows', filter:'.research' });The “.research” above is the name of the category I want to default to.
Forum: Fixing WordPress
In reply to: Show Specific Portfolio Category on Homepage (Remove "ALL")arroyot24 –
So where did you add that line of text?
Thanks,
PL
Viewing 3 replies - 1 through 3 (of 3 total)