WordPress.org

Forums

custom post type tags (1 post)

  1. dynamyc
    Member
    Posted 2 years ago #

    I'm using a custom post type called "portfolio", I've created a taxonomy called "portfolio_tag" and I'm able to add tags on each item.
    Now I want to list them, but I'm having trouble with this because my website loads the content through jquery/ajax.
    Take a look at this snippet from my code:
    here
    I've tried to duplicate all the relevant code which is used for displaying categories but it's not working is not retrieving anything.
    I think I have to define something here but I'm not sure how exactly:

    $args=array(
            'post_type' => array ('portfolio'),
            'orderby' => $orderby,
            'order' => 'DESC',
            'paged' => $paged,
            'posts_per_page' => $post_per_page,
            'ignore_sticky_posts' => $do_not_show_stickies
          );
            if($pf_categorynotin){
                $args['tax_query'] = array(
                    array(
                        'taxonomy' => 'portfolio_category',
                        'field' => 'slug',
                        'terms' => $pf_categorynotin,
                        'operator' => 'NOT IN'
                    )
                ); //category__in
            }

    Any suggestions ?
    Here is my website if helps with something:
    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic