Support » Theme: Sampression Lite » [Theme: Sampression Lite] Filter matched posts

  • Hi.

    Thx for your great theme. You did/do a great job. I having some difficulties in changing the multiple filter option, to show the posts the match ONLY the selected categories.

    Eg. If I select 2 categories, then I only want to se the posts that match


    categories and not the post from 1 category + the posts from the other category.

    Hope, that you understand what I mean.

    I found your note in the header.php, where you write, that you use som of the code from

    I also found the code as shown below in includes/functions.php.

    BUT I just don’t know how and where to start.

    Where can I change the code, so I get the BOTH as described here?

    .metal.transition will show item elements that have BOTH .metal and .transition classes.

    Thanks in advance.

    Kind regards.
    Troels Christensen, Denmark

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum’s parser. Or use instead. ]

    !-- Filter the Post by Category: We are using Isotop ( for Filtering: An exquisite jQuery plugin for magical layouts -->
    <?php if(is_home()): ?>
    <nav id="primary-nav">
      <div class="container">
      <a href="#">show/hide</a>
      <div class="columns sixteen">
        <div class="nav-label"><?php _e('Vis: ','sampression'); ?></div>
        <ul class="nav-listing clearfix">
    <li><a href="#"><span></span><?php _e('Alt','sampression'); ?></a></li>
            $categories = get_categories();
            foreach($categories as $category):
    <li><a href="void(0);">slug; ?>" id="<?php echo $category->slug; ?>" class="filter-data"><span></span><?php echo $category->name; ?></a></li>
        <!-- Check Viewport: If the normal design couldn't fit with viewport, the Categories will appear via CSS with Select Menu form -->
        <select name="get-cats" id="get-cats">
            <option value="*">Show all</option>
            foreach($categories as $category):
            <option value=".<?php echo $category->slug; ?>"><?php echo $category->name; ?></option>
    <!-- #primary-nav -->

Viewing 1 replies (of 1 total)
  • Hi there

    I also love the theme but am trying to achieve the same thing as troelschristensen.

    I am old school with SQL so I guess what I am trying to achieve is an ‘and’ filter rather than an ‘or’ filter.

    I am just pitching in on the post in hope it will attract a solution.

    Many thanks.

Viewing 1 replies (of 1 total)
  • The topic ‘[Theme: Sampression Lite] Filter matched posts’ is closed to new replies.