Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to write custom query in wordpress?



How to write custom query in wordpress?..

Answer / Amnish Kumar

"To write a custom query in WordPress, you can use the WP_Query class. Here's an example:nn$args = array('post_type' => 'post', 'posts_per_page' => 5);n$my_query = new WP_Query($args);nwhile ($my_query->have_posts()) : $my_query->the_post(); the_title(); endwhile; wp_reset_postdata();"

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More WordPress Interview Questions

How many hours does it take to create a website?

1 Answers  


Is wordpress completely free?

1 Answers  


Can pages have categories in wordpress?

1 Answers  


What is difference between wordpress and html?

1 Answers  


Can I run a website without hosting?

1 Answers  


What are the steps should be followed for installing wordpress?

1 Answers  


How many pages can you have on a wordpress site?

1 Answers  


How do I add and remove categories in wordpress?

1 Answers  


Where are wordpress themes stored?

1 Answers  


What is the difference between post and pages?

1 Answers  


Is webflow better than wordpress?

1 Answers  


How do I update wordpress without losing content?

1 Answers  


Categories