Sunday, February 24, 2019

How to retrive the post from english category of custom post type english

https://codex.wordpress.org/Class_Reference/WP_Query

<?php
                   $args = array(
                        'showposts' => 4,
                        'offset'=>1,
                     
                  'tax_query' => array(
            array(
            'taxonomy' => 'english_category',
            'field' => 'slug',
            'terms' => 'travel',
           
                    )
                    )
                    );
                    $the_query = new WP_Query( $args );
                     if($the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post();
                     ?>

No comments:

Featured Post

Make money online

https://www.wpbeginner.com/beginners-guide/make-money-online/?fbclid=IwAR0_9_5aHmbB4rDisaPevdnO4uAgo0N9heHgPu1TjerjurE5ilD2NyzeB2A

Popular Posts