flyntwp / flynt

Component based WordPress starter theme, powered by ACF Pro and Timber, optimized for a11y and fast page load results.
https://flyntwp.com
MIT License
735 stars 84 forks source link

how to do Archive pages.. #388

Closed koraysels closed 3 years ago

koraysels commented 3 years ago

Normally we would use the archive.php file and go from there but I don;t see it in the flynt theme. How do you guys do Archive pages of post types ?

koukouchris commented 3 years ago

Hey @koraysels The starter flynt theme uses basic index.php template file for the archive page of default post type. For additional custom post types archive-{post-type}.php can be added to theme folder.

koraysels commented 3 years ago

Cool, and how do you get there? If I generate the archive link for the post type with the standard Wordpress functions it generates a url that resolves in a 404. Maybe there is an archive example somewhere ?

Thanks!

On 14 Jul 2021, at 18:53, Christina Koukouliata @.***> wrote:

 Hey @koraysels The starter flynt theme uses basic index.php template file for the archive page of default post type. For additional custom post types archive-$postype.php can be added to theme folder.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

koukouchris commented 3 years ago

@koraysels I am not sure exactly how is your set up or what functions did you try, but in general posts page is the page you will set up in the admin Settings -> Reading -> Posts page (if you select static page) or the homepage. So you are looking for the posts page link not an archive link.

Another simple way to get to posts page would be from your admin go to Posts (/wp/wp-admin/edit.php) and select 'View Posts'.