extract category from permalink URL