Ok I finally notice what is it that I have to do! 😀
The variable was already set in the array in the shortcode atts.
All I had to do was set the parent=$category in the before the filter:
$terms = get_terms('cat_portfolio', array('hide_empty'=> true, 'parent'=> $category));
For wordpress developers maybe this is very easy but I am learning.
Hope this helps someone.
Related Posts:
- Taxonomy: Why ‘with_front’ => false DOES NOT WORK?
- Custom taxonomy not showing up when adding a new custom post type
- show tags of custom post type ONLY
- Retrieve single term slug
- Create an archive page for custom taxonomies
- How to sort list of custom posts to get view like a tree of posts under categories and their children’s categories?
- List taxonomies with thumbnails
- Rewrite custom post & taxonomy to share same URL path
- Add Taxonomy Values Within a Custom Post Type RSS Feed
- Custom Post type taxonomy single templates
- Use the_taxonomies() to create a simple list
- Listing taxonomies from custom post type
- Permalinks for Taxonomy and Custom Post Type
- Order WordPress Custom Taxonomy Pages & Pagination Not Working
- Have a Custom Post Type index page display taxonomy items instead of posts
- Hierarchical Custom Post Types – Show only parent on tax archive?
- Pagination is not working on single-{slug}.php but works fine on page-{slug}.php
- How to get the post type from a category id?
- Custom Post type is being ignored in query
- Change or update WordPress loop based on dropdown selection
- Custom Post Type Set Comments ON by default without show METABOX
- How do I do this with WordPress? Taxonomies?
- How to display custom taxonomies with links in filter menu?
- Limit amount of posts made within a custom taxonomy
- Issue on Creating Custom Tax Term Dynamically From Another CPT Meta-box On Publish
- list taxonomies from a custom post type
- Show child custom post types list inside single parent custom post type
- Several post types on WP Query by tag and taxonomy
- Set a CPT slug as a base name for all the taxonomies
- Taxonomies relations
- Full Custom Post Type List Organised by two Taxonomies
- Adding custom taxonomy in same menu place with two custom post types
- Multiple pages for posts?
- Organize WordPress site, so it can maintain with huge database
- Filter get_cat_id for Custom Post Type
- Rename a slug label
- Custom Taxonomy Category link
- Get Post Terms of Current Post (selected taxonomy term) – How to get only the taxonomy value and not “Array ( [0] => taxonomy term )” in the frontend?
- Need help deciding on a taxonomy
- Query all post and CPT from 2 specific taxonomies AND by ACF custom field
- Get Posts by Category, Tag , and CPT Taxonomy
- Pagination hitting 404 page on /page/4
- Rewrite custom post type with taxonomy
- Topic won’t save for a custom post type — how to debug?
- WordPress multisite – is it possible to have different taxonomies for each site?
- How to show list of taxonomy terms associated with specific post?
- How do I display child post types in the parent post type template
- Sort results without WP_QUERY?
- I have custom post type with custom taxonomy. But not found the taxonomy page..
- Group Custom post type in a taxonomy page by its child taxomony
- Getting List of child terms from custom taxonomy parent
- Custom taxonomy query showing more than 4 posts
- Custom Post Type Taxonomy Term Order by Title
- Using page title as a link to term archive
- Custom Post Types – Taxonomy and Customization
- wp_dropdown_pages with tax_query clause
- Building a Data Intensive Website with WordPress
- Custom post type, taxonomy and admin bar
- Displaying taxonomies as category links within sidebar and creating pages for these
- How to get post count of specific taxonomy that have store name & category
- Get List of Terms based on a given term (different taxonomy)
- Duplicate slug/permalink issue while adding same post name
- Do post types share the same records using the same taxonomy?
- Get the taxonomy value in the post loop inside the archive page
- How best to structure multiple CPTs and tax within a ‘resources’ section
- Custom post type archive URLs with a single taxonomy
- Custom post type archive page filters
- wp_set_object_terms creates taxonomies but does not add custom posts to it
- check if current page is a child of a specified top level page
- get taxonomies from terms
- Taxonomy counter on Taxonomy List(plugin)
- Get all posts for custom taxonomy term
- Listing all custom posts having a specific taxonomy whatever the terms
- tax_query not working?
- Multiple Custom Post Type with different Taxonomies
- Connect 8 Taxonomies to One (Main) taxonomy. How to?
- Filter By Term Not Working – Custom Post Type
- Custom Taxonomy is disabled on Edit page
- Override “Parent” input for custom taxonomy
- Related posts by taxonomy [duplicate]
- Taxonomy count per Post type
- Custom Post Type Categories Not Maintaining URL structure any more
- Best way to structure article and issue relationship for CPT
- Custom Post Type used for FAQs Accordion
- How to display elements of different post types?
- Custom Post Type children and grand-children in one list
- How to display only taxonomies of custom post type in a page?
- Check if taxonomy is attached to at least one post in a post-type
- How to make an admin create/edit post page to look like taxonomy page?
- Looping taxonomy in taxonomy?
- Custom Post Type order Title ASC
- Custom posts and custom taxonomies for many products and categories?
- How do i get the taxonomy term name on the CPT archive page?
- Echo post count of CPT with current taxonomy
- Is there a function that replace category name with a icon?
- Show custom category archive as front page and remove taxonomy slug from urls
- Passing total post count to javascript
- Get a custom post type’s taxonomy type term names displayed as checkboxes and filter
- How to get taxonomy category in permalink for each taxonomy OR How to give a parent page to a given taxonomy?
- How to determ a custom post type url?