Fix permalinks for custom posts