Created
March 24, 2015 16:52
-
-
Save cliffordp/baa60730c5f36a7b2509 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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