- This topic has 7 replies, 2 voices, and was last updated 3 years, 11 months ago by
David.
-
AuthorPosts
-
May 11, 2022 at 4:18 am #2216151
Matt
Hi Guys,
Just wondering what the recommended way is to allow me to make my custom post type archive page (videos) as the websites home page (as selected in settings > reading > homepage).
I want to be able to use the GP elements content templates to style my custom post type archive loop.
Thanks
May 11, 2022 at 4:32 am #2216161David
StaffCustomer SupportHi there,
will you still have regular posts on your site ? And if so how are they to be displayed ?
Might be handy if could also see the site.
May 11, 2022 at 4:38 am #2216167Matt
Hi,
The site is still in dev. Yes I will still have regular posts. They will be displayed on a ‘blog’ page.
Thanks
May 11, 2022 at 4:46 am #2216175David
StaffCustomer SupportOptions are:
1. create your own custom front-page.php with a loop for displaying the video posts…. bit of a ballache.
2. Use a static page and in the near future use GenerateBlocks 1.5 to add the loop:https://generateblocks.com/generateblocks-1-5-dynamic-data-query-loops-image-blocks/
May 11, 2022 at 4:51 am #2216178Matt
Thx.
Can I confirm… if I go option 1, will I be able to or what do i need to include to use the GP Content templates to style the posts?
And is there a scheduled release date for the GB 1.5? I can see it is in Alpha but it might not be an option if you are still weeks or months away from a release.
Thanks
May 11, 2022 at 5:16 am #2216196David
StaffCustomer SupportOption 1 – In theory yes…
If you want to try then this would be my approach:1. copy the GP archive.php template as the basis for your
front-page.php2. Now you need a blank page for your Blog and another one for a Static Home Page. And set them accordingly in Settings > Reading. That should allow you to have a separate blog. And the front-page.php will override the static home page.
3. Then filter the front page so it shows just your custom post type with this snippet:
add_filter( 'pre_get_posts', function( $query ) { if ( is_front_page() && $query->is_main_query() ) $query->set( 'post_type', array( 'your_custom_post_type_here') ); return $query; });Or create your own custom loop in the front-page template.
4. Create your Content Template and set its Display Rules to:
Front PageThats the theory anyway 🙂
GB 1.5 – hard to give a definite timeline at this stage, as we’re still in Alpha, i would like to think no more than 1 month,
May 11, 2022 at 5:18 am #2216202Matt
Thanks.. Much appreciated!
May 11, 2022 at 5:20 am #2216206David
StaffCustomer SupportYou’re welcome – if the above works then i would be super glad to hear about it 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.