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 :)

by
by
by
by
by
by