I have a WP site here: http://www.undergroundsound.com.au
As you can see each post on the front page says “Posted in ‘child categories’”. I would like it to say something like “Posted in ‘parent category’ – ‘child categories’”.
This is the code that needs to be edited, in content.php:
<?php printf( __( 'Posted in %1$s', 'underground_sound' ), $categories_list ); ?>
Any help would be much appreciated. Thank you for reading.
Try this: (taken from this post: WordPress function to get top level category of a post?):
put this in your functions.php file at the bottom before the closing ?> tag
Amend your content.php: