• rezon2000

    (@rezon2000)


    Hello everyone,

    I’m encountering an issue with my WordPress site using the custom theme Roofix. My goal is to have a custom Services page displayed at the /services/ URL, but the Services Archive page keeps showing instead. Here’s a detailed explanation of the problem and all the steps I’ve taken so far to resolve it.

    The Problem:
    I’ve created and edited a custom Services page and want it to appear at the /services/ URL. However, whenever I try to set the URL as /services/, the Services archive page shows instead. This archive page has the default “Services Archive” SEO title and description, and it overrides my custom page.
    When I change the URL to something like /services1/, the custom page shows correctly, but of course, that’s not the URL I want. It seems like the /services/ URL is tied to the archive, and I can’t figure out how to disable the archive or get the custom page to display at this URL.

    What I’ve Tried So Far (None Worked):

    1. Looked for has_archive Setting in Theme Files:
    I searched through the theme’s files like functions.php, general.php, rdtheme.php, and others to locate where the custom post type roofix_services is registered. I was trying to set 'has_archive' => false to disable the archive. Unfortunately, I couldn’t find where this CPT is registered, and none of the files I checked included the has_archive setting.
    Could the CPT be registered in another location or file that I’m overlooking? Any suggestions on where else I could look?

    2. Checked for Template Conflicts in Theme:
    I explored the theme’s folder and looked for files like archive-services.php or archive.php that could be overriding my custom page. I found and renamed archive-services.php to archive-services-old.php to disable the archive template. However, even after doing this, a different archive page started displaying instead of my custom Services page.

    along alot more that i have lost track of what i’ve done.

    How can I completely remove the archive for the /services/ URL and have it display my custom Services page instead?
    I’ve tried every solution I could think of and nothing has worked so far. Any help or advice would be greatly appreciated!

Viewing 4 replies - 1 through 4 (of 4 total)
  • catacaustic

    (@catacaustic)

    You will need to find where that CPT is registered. From what I’ve seen there’s not any other reliable options for this.

    The other option is to use a different URL. If /services2 isn’t good, then something like /our-services might be better? Remember that the vast majority of users don’t care what the URL is, they just want to see the page, so changing URl’s like this is really only for the benefit of search engines.

    Thread Starter rezon2000

    (@rezon2000)

    I’ve searched through almost all the files trying to find where the custom post type (CPT) for Services is registered but haven’t found the has_archive setting. Is there something else I should be looking for, or could it be under a different name?

    If I create a new URL like /our-services/, the issue is that the service category pages will still rely on /services/, e.g., /services/example.

    Another problem is with the /projects/ URL. I deleted the Projects page, and while I coded it to land on a 404 page, the search engines still show “Projects Archive,” and when clicked, it opens the 404 page. How do I handle this properly so the archive no longer shows up in search results?

    Thanks

    catacaustic

    (@catacaustic)

    If you can’t find it you’ll need to go back to who ever wrote your theme and ask them. they’ll know, where no one else here will have any idea.

    If you really need to have pages there, you should be able to set up a custom template file for that archive page. Looking at the hierarchy details you should be able to set up a file called archive-services.php and that will be over-write any existing template that the services post type uses. You won’t be able to edit the content in this the same way as a standard page, but that’s how it works.

    Thread Starter rezon2000

    (@rezon2000)

    Alright thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.