Related post based on 2 categories

You can do it like below- $query = get_posts( array( ‘category__and’ => array( 6, // Your category-1 ID 7 // Your category-2 ID // And so on and so fourth ) ) ); Now in $query variable you’ll get the object of posts which are in both Category 1 and Category 2 and so on … Read more

Get taxonomy url, name, post count & image

Don´t know how this plugin works in detail but i would try this: <?php $taxonomy = ‘channel’; $tax_terms = get_terms($taxonomy); ?> <ul> <?php foreach ($tax_terms as $tax_term) { ?> <li> <?php echo esc_attr(get_term_link($tax_term, $taxonomy)); ?> <?php echo $tax_term->name; ?> <?php echo $tax_term->count; ?> <?php print apply_filters( ‘taxonomy-images-queried-term-image’, ” ); ?> </li> <?php } ?> </ul>

Displaying subcategories and then posts in taxonomy template

Please try this <?php $term = get_queried_object(); $term_id = $term->term_id; $taxonomy_name = $term->taxonomy; $termchildren = get_term_children( $term_id, $taxonomy_name );?> <?php foreach ( $termchildren as $child ) { $term = get_term_by( ‘id’, $child, $taxonomy_name ); ?> <li> <?php echo $term->name; ?> <?php echo $term->description; ?> </li> <?php } if ( have_posts() ) : /* Start the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)