Skip Navigation

[Resolved] How to set archive as homepage

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.

This topic contains 7 replies, has 2 voices.

Last updated by WeiS2074 1 month, 3 weeks ago.

Assigned support staff: Waqar.

Author
Posts
#1718605

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

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

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

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

#1721841

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

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

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

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!