Main loop querying current template’s info only in custom category archive pages, not my posts

check for slug or url of the page and post. If there is page with the same name then it will query about the page.