Answer the question
In order to leave comments, you need to log in
Why is wordpress filter not working with wp_query()?
I was killed about the question of the filter in wordpress through wp_query ().
<?php
$args = array(
'post_type' => 'sale',
'key' => 'price',
'value' => '200',
);
$query = new WP_Query( $args );
if ( $query->have_posts() ) {
while ( $query->have_posts() ) {
$query->the_post();
echo '<li>' . get_the_title() . '</li>';
}
} else { // Постов не найдено }
wp_reset_postdata();
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question