0

i have added custom post type in Wordpress that works like slideshow, all slides are clickable and open in products slug. how can i query posts subcategories that match with the slide clicked?

code for custom post type is this

add_action( 'init', 'products_post_type' );
function products_post_type() {
  register_post_type( 'products',
    array(
      'labels' => array(
        'name' => 'Products',
        'singular_name' => 'Products'
      ),
      'public' => true,
      'has_archive' => true,
      'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail' )
    )
  );
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.