Search Filter With Custom Taxonomy and Custom Fields : How do I handle it via plugin?
Search Filter With Custom Taxonomy and Custom Fields : How do I handle it via plugin?
Search Filter With Custom Taxonomy and Custom Fields : How do I handle it via plugin?
try like this: if ($obj->have_posts()){ while($obj->have_posts()){ $obj->the_post(); $slug = get_the_tags(); $obj->the_title(); echo “<br/>”; $queryH = array(“cat”=>13,”order”=>”ASC”,”posts_per_page”=>-1,”tag__in”=>$slug); $objH = new WP_Query($queryH); if ($objH->have_posts()){ while($objH->have_posts()){ $objH->the_post(); $objH->the_title(); echo “<br/>”; } } } }
It looks like you may be creating an array around a single long string that needs to be split up into array elements (assuming $idsposts is a string and not an array). Try using $myposts = explode(“,”, $idsposts); Instead of just adding $idsposts as the only element of your $myposts array. You can also check … Read more
I’m pretty sure it’s because you’ve got mixed nested quotes when you’re setting $CatIDsCode. So this should fix it: $camp_posts_bynumber = new WP_Query (array (‘cat’ => $CatIDs)); P.S. Move $CatIDs= implode(‘,’, $out); outside of the foreach loop. 🙂
Replace wp_get_post_tags($post->ID); with wp_get_post_terms($post->ID); All parameter and details can be found here and change the $args parameter $args = array( ‘category__in’ => array($simlar_tag), ‘post__not_in’ => array($post->ID), ‘posts_per_page’ => 3, ‘meta_query’ => array(array(‘key’ => ‘_thumbnail_id’, ‘compare’ => ‘EXISTS’)), ‘ignore_sticky_posts’ => 1, ); Hope it works!
You’re looking for the get_adjacent_post function. This is a built-in wordpress function that you can use to get either the previous or next post from the current post. To get the next post: $next_post = get_adjacent_post( false, ”, false, ” ); To get the previous post: $prev_post = get_adjacent_post( false, ”, true, ” ); You … Read more
In the sidebar, replace this: <a href=””><?php the_title(); ?> </a> with this: <a href=”https://wordpress.stackexchange.com/questions/252150/<?php the_permalink(); ?>”><?php the_title(); ?> </a>
In the end I was thinking too complicated. Instead of having two tax_query arrays inside a single category why not just take the single category for starters and then filter out the posts that have terms with the use of conditionals. It now looks like this and works. <?php $args = array( ‘post_type’ => ‘post’, … Read more
Show All with Isotope
You can try this <?php $args= array( “post_type” => array(“product”, “post”, “page”), “cat” => ‘-124,-52’, “meta_query” => array( array( “key” => ‘include_newsletter_feed’, ‘value’ => “”, ‘compare’ => ‘!=’ ), ), ); $wp_query = new WP_Query($args); ?>