Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter('post_link', 'lastcategory_post_permalink', 10, 3);
- function lastcategory_post_permalink($permalink) {
- $lastCat = array_reverse(explode("/", $permalink));
- $permalink = get_bloginfo('url') . "/".$lastCat[1]."/".$lastCat[0];
- return $permalink;
- }
Add Comment
Please, Sign In to add comment