How to check if a custom page exists

Application Version - OJS 3.1.2.4

I’m developing a theme for OJS, I need to check if a custom page has been created inside OJS and in that case show a link to the footer page but I don’t know how to check if the page exists.

Anyone have any suggestions?