Created
May 5, 2013 23:03
-
-
Save bordoni/5522514 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 | |
| $_filter = function($title, $id) { | |
| if (in_category('nome-da-category', $id) && strpos($title, 'Receita de ')!==false) { | |
| return str_replace('Receita de ', '', $title); | |
| } | |
| return $title; | |
| }; | |
| add_filter('the_title', $_filter); | |
| // mostra a listagem aqui | |
| remove_filter('the_title', $_filter): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment