Get all active posts that are tied to a custom taxonomy for a custom post type

I need to display all the categories I created for a custom post type then inside of each category I need to loop all the posts that are tied to that category. I tried constructing my WP_Query a number of different ways and I can’t get it to work at all. Here’s the code I … Read more

title not being printed within html tag [closed]

Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for WordPress Development Stack Exchange. Closed 8 years ago. Improve this question I am wrapping html tags around the_title(); like if(has_post_thumbnail()) { the_post_thumbnail(‘home-thumbs’); echo “<span class=’home-title’>”.the_title().”</span>”; } But the the_title is printing above … Read more

Newer/Older posts links display same posts on every page

I am using a plugin called “Types” to generate custom post types for drink/food recipes. I want to show booth drink and food recipes on the same page. The posts are displaying fine, but for some reason, when you click “newer posts” or “older posts” it will bring you to a new page, but the … Read more

Help with if/else loop [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 6 years ago. Improve this question can you help me to add an else statement to this loop? <?php $post_type = ‘post’; // <– Post Type … Read more

Woocommerce linking variations

So I have this array (just taking an example, it’s dynamically built up): $v_values = array( array(“C1″,”C2”), array(“F1″,”F2”) ); $v_name = array(“color”,”fabric”); $v_price = array( array(1000,2000), array(3000,4000) ); Now I want to create a product with variation, so this is the code: for($i = 0; $i < count($v_name); $i++) { for($j = 0; $j < … Read more

How to create a loop that will display one post and stop?

I am trying to create a part on my wordpress theme that will only display one featured post. I have installed this plugin – . I know I am supposed to integrate <?php query_posts($query_string.”&featured=yes”); somewhere into the loop to output the featured post. I tried modifying the code from my existing loop that displays … Read more

How to store wordpress title in a variable

trying to run a PHP youtube v3 data in a WordPress theme $grab=ngegrab(‘’.$devkey.’&part=snippet&order=relevance&maxResults=5&q=’.$unity.’&pageToken=’.$yesPage.’&type=video’); trying to store wp title in a variable so it won’t echo the above API URL and it seems all method have tried isn’t working &q=’.$unity.’ in the above code List I tired $unity = $post->post_tite; the_title(); get_the_title(); and even more is … Read more