ivanO-4
Support threads created in the last 30 days: 0
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
Different archive views
Started by: ivanO-4
in: Types Community Support
Problem: I have a custom post type, and want to display the archive in two different ways, showing different fields of the archive e.g. Archive 1 grid: Archive 2 grid: Is this possible? Looks like I can only have one archive layout assigned to a CPT at a time, unless I'm missing something. My google-fu has let me down... Solution: please try Layouts filter hook "get_layout_id_for_render", like this: add_filter( 'get_layout_id_for_render', 'board_members_archive_func', 999, 2 ); function board_members_archive_func( $layout_id, $layout) { if ( isset($_GET['board-members']) && $_GET['board-members'] == 1) { $layout_id = 1390; //print_r ("yes"); } else { //print_r ("no"); } return $layout_id; } Relevant Documentation: |
2 | 14 | 6 years, 11 months ago |