• I’ve created an archive page with elementor for a custom post type – the page opens under domain.com/case-studies – however, the archive is attached to a parent “Resources” in the menu / navigation and I would love to have the url basically domain.com/resources/case-studies – how can I do that??

    thank you in advance for your input.

    • This topic was modified 3 years, 2 months ago by t-p. Reason: Moved to Fixing WordPress from Developing with WordPress
Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    The page lists custom post types, but is case-studies the actual post type, or is it a page slug for a page that lists custom post types (i.e. a page that appears in the Pages list table)?

    If the latter, make the page’s parent the resources page. If the former, leave that be and create a new case-studies page which has resources as the parent. If Elementor has an element that can list post type archives, place that on the page. Otherwise the main query can be altered to get the custom post types instead of the page’s content. This would require a bit of custom coding via the “pre_get_posts” action hook. After verifying we have the correct pagename query var, clear it and set the “post_type” query var to that of the posts you want listed.

Viewing 1 replies (of 1 total)
  • The topic ‘customize archive page url’ is closed to new replies.