Update logic for category, index and post calculation in getpage