user1224976
user1224976

Reputation: 45

Override archive with static page

I have a custom post type created by a third party plugin say portfolios.

Instead of displaying an archive at http://www.example.com/portfolios I want to display a page where I'll insert a shortcode for a few customizations.

Is there a way to override default post_type archive page with a static page?

Upvotes: 0

Views: 1942

Answers (1)

MSTannu
MSTannu

Reputation: 1033

In the archive page, lets say archive-portfolios.php, use get_template_part to include any other file you like instead of the default content. Or if you don't care for child theme override-compatibility, a straight up include will do.

You should also consider putting your customized content straight into the archive template.

Upvotes: 1

Related Questions