173 posts
  • Has referred 1+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Has been part of the Envato Community for over 4 years
+2 more
MsTrends says

Hey people,

Hope you would be fine. My question is specific for WordPress authors here …

I’ve created a CPT named portfolio. Now i want to create a page which will act as an INDEX for this CPT. Now i’ve two choices ….

a) Make a custom template having custom WP_Query. In this way i can assign this template to any page and that page will work as an index.

b) Make archive-portfolio.php instead, which will act as an INDEX.

Now i’ve a few questions …

1: Which is the correct approach?

2: If (a) then what is the actual usage of archive-cpt.php page then?

3: If (b) is correct approach, is there any possibility to make this page available in wordpress menu manager by default and also in the drop down menu (located at Setting->Reading) to use it as front page?

1 post
  • Has been part of the Envato Community for over 1 year
  • Has referred 1+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+2 more
MeetMighty says

To answer your questions:

Personally, I say the correct approach is the archive-CPT.php.

Unfortunately, many buyers seem to have a much harder time with this approach, and are more comfortable using custom page templates.

Therefore, I recommend a custom page template. Hope that helps.

173 posts
  • Has referred 1+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Has been part of the Envato Community for over 4 years
+2 more
MsTrends says

Personally, I say the correct approach is the archive-CPT.php.

Yeah, man i also think it should be the correct approach. But as you said …


Unfortunately, many buyers seem to have a much harder time with this approach, and are more comfortable using custom page templates.

Uptill now, i didn’t see any WordPress native approach which allows us to use this archive page in menu manager and as a home page.

Thnx for you point of view BTW :)

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by