Created
December 19, 2022 19:55
-
-
Save jamesmthornton/782f44d9f7ce084e168b098b2eab516f to your computer and use it in GitHub Desktop.
FacetWP Troubleshooting 12-19-2022 Template and Query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// query args generated | |
return [ | |
"post_type" => [ | |
"cases" | |
], | |
"post_status" => [ | |
"publish" | |
], | |
"facetwp" => [ | |
"true" | |
], | |
"orderby" => [ | |
"date" => "DESC" | |
], | |
"posts_per_page" => 18 | |
]; | |
<?php | |
//template (most simple one I tried) | |
if ( have_posts() ) : ?> | |
<?php while ( have_posts() ): the_post(); ?> | |
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3> | |
<?php endwhile; ?> | |
<?php else : ?> | |
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment