Skip to content

Commit

Permalink
Merge pull request #2221 from CityOfPhiladelphia/SQLQueryFix
Browse files Browse the repository at this point in the history
sql fix attempt
  • Loading branch information
arminmobasseri authored Jan 9, 2025
2 parents 04ffb04 + d797811 commit d0c45c3
Showing 1 changed file with 11 additions and 27 deletions.
38 changes: 11 additions & 27 deletions wp/wp-content/themes/phila.gov-theme/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,35 +61,19 @@ function phila_gov_setup() {
function phila_register_category_menus() {

$get_possible_pages = array(
'post_type' => array('department_page', 'programs'),
'posts_per_page' => -1,
'order' => 'asc',
'post_type' => array('department_page', 'programs'),
'posts_per_page' => -1, // Retrieve all posts
'order' => 'ASC',
'orderby' => 'title',
'post_status' => 'any',
'post_status' => 'any', // Exclude 'trash' and 'auto-draft'
'meta_query' => array(
'relation' => 'OR',
array(
'key' => 'phila_template_select',
'value' => 'prog_landing_page',
'compare' => '=',
),
array(
'key' => 'phila_template_select',
'value' => 'homepage_v2',
'compare' => '=',
),
array(
'key' => 'phila_template_select',
'value' => 'homepage_v3',
'compare' => '=',
),
array(
'key' => 'phila_template_select',
'value' => 'department_homepage',
'compare' => '=',
),
),
);
array(
'key' => 'phila_template_select',
'value' => array('prog_landing_page', 'homepage_v2', 'homepage_v3', 'department_homepage'),
'compare' => 'IN',
)
)
);
$query = new WP_Query( $get_possible_pages );

// The Loop
Expand Down

0 comments on commit d0c45c3

Please sign in to comment.