Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JeffCleverley/ce3887d3cc7fa326ee127e36d210654b to your computer and use it in GitHub Desktop.
Save JeffCleverley/ce3887d3cc7fa326ee127e36d210654b to your computer and use it in GitHub Desktop.
<?php
add_filter( 'toolset_build_intermediary_post_title', 'make_descriptive_intermediary_post_titles', 11, 4 );
function make_descriptive_intermediary_post_titles( $post_title, $relationship_slug, $parent_id, $child_id ){
$parent_title = get_the_title( $parent_id );
$child_title = get_the_title( $child_id );
return $relationship_slug . ': ' . $child_title . ' in ' . $parent_title;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment