Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8430669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:39:04+00:00 2026-06-10T05:39:04+00:00

I’m using theme that have build-in Portfolio tab in the admin panel. this theme

  • 0

I’m using theme that have build-in Portfolio tab in the admin panel.
this theme using the portfolio items and portfolio categories instead of the original posts items and categories.

i’ve build a plugin that make list out of the portfolio’s taxonomy – “categories”

<?php $portfolio_cats = get_terms( 'Categories', $args); ?>
    <?php foreach ($portfolio_cats as $cat) { echo "<option value = '".$cat->name."'>".$cat->name."</option>"; } ?> </select> <input style = "height: 35px;

and wanted to filter all the posts that are not related to the chosen category by the category’s ID.

<input style = "height: 35px;
padding: 10px 45px;" type = "submit" value = "הצג" /> </form>
   <table class="widefat" style = "margin: 0 auto;width: 908px;">
        <thead>
            <tr>
                <th>Category</th>
                <th>Name</th>
            </tr>
        </thead>
        <tbody>
        <?php
            $category_id = get_cat_ID(''.$_POST['filter'].'');
            $q = 'cat=' . $category_id;
            query_posts($q);
            if (have_posts()) : while (have_posts()) : the_post(); ?>
           <tr> <td> <?php echo $_POST['filter']; ?> </td> <td> <a href="<?php the_permalink();?>"><?php the_title(); ?></a> </td> </tr>

           <?php endwhile; endif; ?>
        </tbody>
    </table> 

but no matter what, its always show me the same original posts, and nothing from the portfolio’s posts..

any help would really be appreciated.

UPDATE:
Its now showing every portfolio item but, its showing it only at startup, when i choose category and run search filter, its showing nothing

<input style = "height: 35px;
padding: 10px 45px;" type = "submit" value = "הצג" /> </form>
   <table class="widefat" style = "margin: 0 auto;width: 908px;">
        <thead>
            <tr>
                <th>Category</th>
                <th>Name</th>
            </tr>
        </thead>
        <tbody>
        <?php
            $category_id = $_REQUEST['filter'];
            /* $q = 'cat=' . $category_id; */
            query_posts( array ( 'cat' => $category_id, 'posts_per_page' => -1, 'post_type' => 'portfolio' ) );
            if (have_posts()) : while (have_posts()) : the_post(); ?>
           <tr> <td> <?php echo $_POST['filter']; ?> </td> <td> <a href="<?php the_permalink();?>"><?php the_title(); ?></a> </td> </tr>

           <?php endwhile; endif; ?>
        </tbody>
    </table> 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T05:39:05+00:00Added an answer on June 10, 2026 at 5:39 am

    I was sending a wrong key, instead of ‘cat’, it should be -> categories

    query_posts( array ( 'categories' => $category_id, 'posts_per_page' => -1, 'post_type' => 'portfolio', 'post_status' => publish, 'orderby' => 'title', 'order' => 'ASC' ) );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
We're building an app, our first using Rails 3, and we're having to build
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I know there's a lot of other questions out there that deal with this
I have thousands of HTML files to process using Groovy/Java and I need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.