Skip Navigation

[Resolved] How to set archive as homepage

This support ticket is created 4 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 7 replies, has 2 voices.

Last updated by WeiS2074 4 years, 3 months ago.

Assisted by: Waqar.

Author
Posts
#1718605
set homepage.JPG

Hi,

How can I set archive as my homepage? I am using GereratePress as theme, I look at Setting-> Reading. there is no option to set archive as homepage, same as theme setting.

#1719145

Hi,

Thank you for contacting us and I'd be happy to assist.

To use the archive as the homepage, you'll need to make sure of these two points:

1. No static page is selected as a "Homepage" in the reading settings.
( example screenshot: hidden link )

2. In the target, WordPress Archive's "Loop Selection" settings, the "Home/Blog" option is selected.
( example screenshot: hidden link )

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#1719343

My issue is resolved now. Thank you!

#1719357
home3.JPG
home2.JPG
home.JPG

I do what you said, my homepage is set, but all the post isn't shown. see the difference before and after.

#1721841

Hi,

Thank you for sharing those screenshots.

I tried to log in using the admin access details from the previous ticket, it seems that the password has been changed.

Can you please share updated temporary admin login details along with your permission to set WordPress archive as the homepage again, to troubleshoot the missing posts?
( currently a static front page is set )

Note: I've set your next reply as private.

regards,
Waqar

#1726439

Hi,

Thank you for waiting, while I performed some testing and research around this requirement.

By default, the WordPress homepage's loop query only brings in the "Posts" and not any other custom post types.

To show the "Unwraps" type posts on the homepage, using the WordPress Archive "Archive for Unwrap", you can include the following code, in the active theme's "functions.php" file:


function custom_post_type_in_home_loop( $query ) {
	if ( is_home() && $query->is_main_query() )
		$query->set( 'post_type', array( 'unwrap') );
		return $query;
}
add_filter( 'pre_get_posts', 'custom_post_type_in_home_loop' );

This will force the homepage's loop query to bring in the "Unwraps" type posts.

Another alternative is that instead of assigning a WordPress Archive, to your homepage, you can set a static front page, and inside it insert a post view that shows the "Unwraps" type posts.

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#1726465

To your first solution by adding the code into function.php, this will cause the page losing the filter in archive. I searched another thread https://toolset.com/forums/topic/how-to-set-up-archives-for-custom-post-as-homepage/, it mentions there is no easy way to do it. I will give up on this issue.

#1726527

Thank you!