Plugin Author
Ajay
(@ajay)
Hi, sorry for the delayed response. You can’t do this directly via the settings but you could do it with a code snippet. Are you comfortable adding a code snippet to your site?
Thank you for the response.
If you could let me know the snippet I can add this…. Thank you so much,
Plugin Author
Ajay
(@ajay)
Try this:
function crp_list_cats( $output, $result, $args ) {
$categories = get_the_category_list( ', ', '', $result->ID );
$output .= ' ' . $categories;
return $output;
}
add_filter( 'crp_after_list_item', 'crp_list_cats', 10, 3 );
Thanks for the response – but the function is not returning anything.
Plugin Author
Ajay
(@ajay)
Where are you adding this in? Are you seeing the regular related posts but not the categories included?
I added to the functions file..
The related posts are showing as normally… but not listing the category under the title… by the by line
Plugin Author
Ajay
(@ajay)
Would you be able to try this with the code snippets plugin?
https://ww.wp.xz.cn/plugins/code-snippets/
Plugin Author
Ajay
(@ajay)
Also, you will need to clear the plugin’s cache under Tools > Related Posts Tools
This worked – is there anyway to have it display under the post title?
right now it is being inserted after the closing li crp_related li </li> tag of the post block…
Let me know – much appreciated!
Plugin Author
Ajay
(@ajay)
Not easily with a filter because it’s then in the middle of the content.
My pro version, which will be out soon, includes a custom block that allows you to select whatever content you need similar to the Query Block or choose from ready templates.