increaseDisplayNum will not increase displayNum to higher than the length of the userPosts array