Re: Feature request
I just spotted https://webberzone.com/downloads/crp-taxonomy/
I will still appreciate help on showing the cat/tax.
Is there a way to specify criteria for each taxonomy? What i am trying to do is show related posts for tax ‘A’ from ‘B’, and related posts for ‘B’ from ‘A’.
-
This reply was modified 9 years, 6 months ago by
Abdullah Ali.
Plugin Author
Ajay
(@ajay)
Plugin Author
Ajay
(@ajay)
You can’t do the criteria part as of now. It’s a good feature but quite complicated for me to code at this stage.
Many thanks for your support.
So, do i just include the code from Top10 to my function?
Where do i use crp_after_list_item ?
Plugin Author
Ajay
(@ajay)
Code would be something like this:
<?php
/**
* Add categories to the list items.
*
* @since 2.2.0
*
* @param string $output Formatted list item with link and and thumbnail
* @param object $result Object of the current post result
* @param array $args Array of arguments
*
* @return string Output variable with categories added
*/
function crp_add_list_cats( $output, $result, $args ) {
$categories = get_the_category_list( ", ", "", $result->ID );
$output = $categories . " " . $output;
return $output;
}
add_filter( 'crp_after_list_item', 'crp_add_list_cats' , 10, 3 );