WordPress.org

Ready to get started?Download WordPress

Forums

Filter custom posts by custom categories (1 post)

  1. Morenito
    Member
    Posted 2 years ago #

    Hey

    I have created a custom post structure to insert my portfolio items and registered a custom taxonomy called "portfolio" to categorize the posts.

    http://imageshack.us/photo/my-images/600/capturadeecr20111011s17.png/

    The insertion goes fine, with no problems.

    When i try to get this custom posts on frontpage, i want to filter them by category, but nothing happens. It keep showing me all the posts. the filter dont work.

    Here is the code i use:

    $projects_list = get_posts( array( 'orderby' => 'post_date', 'order' => 'DESC', 'post_type' => 'portfolio', 'post_status' => 'publish', 'portfolio_category' => 7 ) );

    How can i filter custom posts by custom categories?

    Regards

Topic Closed

This topic has been closed to new replies.

About this Topic