modify pages functionality in the wordpress