The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Need to list subcategories while using isotope in wordpress

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #41047

    Hi I’m using isotope to navigate a client site I’m working on. I’ve gotten the parent categories to list and do what they are suppose to do but the subcategories aren’t displaying. Any help would be greatly appreciated.

    An example of what I’m trying to achieve can be found here

    <dl class="accordion" id="filter" data-option-key="filter">
    <dt><h2><a href="#" data-filter="*" id="showall" class="selected about-senseitop close-subnav filter-item">All</a></h2></dt>
    'orderby' => 'name',
    'order' => 'ASC'
    foreach ($categories as $cat) { ?>
    <dt><a href="#" class="customer-acquisitiontop" id="<?php echo $cat->slug; ?>" data-filter=".<?php echo $cat->slug; ?>"><h2><?= $cat->cat_name; ?></h2></a></dt>
    <dd class="services">
    <ul class="row">
    <li class="slug; ?>">

    <?php } ?>
    Chris Coyier

    You might want to try instead of doing a custom category loop trying wp_list_categories ( and seeing if that gives you the right stuff (and maybe you can just work with that markup).

    Otherwise you’ll need to dig into what $categories is turning out to be and adjust your loop to output the right stuff. It’s probably very close, just some syntax issues (I’m not quite sure).


    Thanks Chris I’ll give those options a try. Greatly appreciated.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.