There was some syntax errors, but fixing and combining the answers from the referenced post makes that code that works fine.
Related Posts:
- Make Two Views of Post Type Archive At Two URLs
- Showing only future posts in archive based on custom field date
- How to remove current year from wp_get_archives
- Archive template
- Archive list for custom post type categories
- Check if is post type archive and in category
- Not able to see CPT archive template
- Create Archive Page with Visual Composer
- Add archive/category results to single post page
- Not able to see archive page of custom posts
- Archive Custom Post Type
- Custom Post Type archive (archive-{post-type}.php) is not working
- How to display archive page posts based on author_id
- Limiting the Archive page to posts posted by particular author
- Using WP_Query how can I show events (a custom post type) that are in the future?
- Archive-Custom-Post-Type order by Event Date, ASC, and hide events that have completed
- What code do I “comment out” to remove the loop from this Custom Taxonomy
- Custom Post Archive – display page 1 differently then subsequent pages
- CountUp timer for custom post
- Custom Post Type Archive – archive.php is present, but it is not being used
- Custom post type archive url when post type has archive string
- get custom post archieve by month
- Customing Annual Archive plugin
- Notice- undefined variable post and trying to get property of non-object
- WordPress Rewrite Url with arugments
- How to link to an archive-special.php from a custom front-page template?
- How to remove custom post type archive
- How to use a custom post type archive as front page?
- Proper way of making custom post type landing page or archive page
- Custom Post Type Archives with 0 Posts Redirects as 404
- Get monthly archives for custom post type
- How to get_queried_object on multiple objects?
- Assign Page Template Within A Custom Post Type
- How to group by taxonomy on Custom Post Type archive
- Post type archive page not working
- Custom Post Type – Archive page title
- Should I change these content meta types before building complex archive page?
- Getting taxonomy terms used by custom post type
- Removed slug from CPT, now How/where do I hook the filter to the taxonomy term archive pages link?
- Archive or taxonomy pages not working for custom post type
- I am facing problem in my archive page , it is partially working
- Ordering Posts Type A by Custom Fields of related Post Type B
- taxonomy template for custom post type the same as the archive
- Conditional tags don’t work
- Custom template won’t load for a custom post type (custom permalinks used)
- Changing number of posts per page on CPT-archive.php, have tried 20-30 code chunks so far
- is_page() not working with archives?
- 404 on term taxonomy archive pagination only with some terms
- CPT custom archive template does not get loaded
- Create template for taxonomy results limited by Custom Post Type
- How to disable pagination (next/previous links) on post type archive?
- Get number of post who belongs in two taxonomies!
- Custom post type: Disable single page, but keep archive
- Custom Post Type Yearly Archive Permalinks
- Use Custom Post Type archive page for the taxonomies term archive page
- Number of Custom Post Types published are not being shown in the custom page
- Custom Post Type has_archive
- Custom Post Type Archive URL is wrong
- list archives per post types
- How to filter by date & a specific custom post type post-WP 4.4?
- How to display an other custom post type in a different custom post type’s archive?
- Canonical url differs from custom post type archive URLs
- Display a custom posts page for post type
- Custom post type archive pagination 404
- posttype/taxonomy/term archive page 404 error
- Ignoring slug capitalization on rewrite rule for custom post type archive page
- My archive-posttype.php template is not loading
- Custom Post Archive is not working
- Set featured image to archive.php
- How can I use archive-{post_type}.php theme template?
- Custom meta Title for custom post type archive from page
- Alphabetically sort a taxonomy.php template by post title
- I created a normal page, but the page displays as an archive page
- Custom Post type date archive for custom taxonomy
- Custom Post Type Custom Archive Page Not Working
- Getting custom taxonomy posts on archive page
- How to get type of archive whether it is post or date or category archive?
- Permalinks that go to a specific template
- Pages not appearing?
- Add content in cpt archive page
- WordPress Page hierarchy ( parent is singular of custom post types slug ) is returning not found
- Display Custom Post Type Archive content with Shortcode
- Custom Post Type WP_Query with filters and search
- get_permalink() of page the enclosing page not posts
- URL Rewrite and Archive Template Files – Post Type vs. Taxonomy
- How to manage a custom post type archive as a page?
- Display tag links on archive page?
- Change the Page Title of the Archive Page for Portfolio Tags
- Pagination not working on my archive page for a custom post type
- Custom post types not displaying per category
- Custom post type with two templates
- Custom post types archive
- Custom Post type and Custom taxonomy with URL rewrite worked but template did not
- Custom post type category page not working
- paging is not working properly on news archives page [duplicate]
- Custom Archive with Content for Custom Post Type
- CPT Archive with parent page
- custom post type not getting archived?
- Remove plugin’s custom post type archive page and single pages [closed]
- How enter custom post meta or custom field on box post list archive page?