How to get custom post sub category link?

QuestionsCategory: QuestionsHow to get custom post sub category link?
Max Staff asked 3 years ago

I need to get an echo of custom post sub category link. I can’t figure it out. This is what I do have. Here under taxonomy is default custom post category. All new that someone creates are sub category under this one.

 

<?php

$cpt_query = new WP_Query( array(
‘post_type’ => array(
‘match’,
),
‘tax_query’ => array(
‘relation’ => ‘AND’,

array(
‘taxonomy’ => ‘fixs_cat’,
‘field’ => ‘slug’,
‘terms’ =>  $fix_cat1 ,
‘include_children’ => true,
‘operator’ => ‘IN’
)),
) ); ?>

 

Now if i go with foreach i will get all sub categories and it works fine, but this is not what i need. Under terms a variable $fix_cat1 displays under tab1 posts from any category. Now at the end i need to add view more links from this category.  Any ideas how to do it?

Last Update: November 24, 2016 | 8:24 AM

Subscribe For Latest Updates

Signup for our newsletter and get notified when we publish new articles for free!




%d bloggers like this: