Skip to content

Instantly share code, notes, and snippets.

@cliffordp
Created March 24, 2015 16:52
Show Gist options
  • Select an option

  • Save cliffordp/baa60730c5f36a7b2509 to your computer and use it in GitHub Desktop.

Select an option

Save cliffordp/baa60730c5f36a7b2509 to your computer and use it in GitHub Desktop.
<?php
//from http://www.pagelinestheme.com/all-the-dynamic-dms-page-handling-you-want/
add_filter( 'pl_breaker_type', 'custom_breakers');
function custom_breakers( $type ) {
$prepend = '* ';
//each post category is its own type
if(is_category()) {
$type = $prepend . get_category(get_query_var('cat'))->slug;
}
//each custom taxonomy (not each term within each taxonomy) is its own type
if(is_tax()) {
$type = $prepend . get_query_var( 'taxonomy');
}
return $type;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment