$orders = get_posts(array(
  'post_type' => 'lp_order',
foreach ($orders as $order) {
  // get all order data code 
  1. This the code I will try to learnpress plugin order post type front end display but it's not working I also check his capability.

    please suggest me I am a beginner in WordPress so no more ideas.

  2. I try a different method like this:

$args = array(
  'post_type' => 'lp_order',

$tech_posts = new WP_Query($args);
if ($tech_posts->have_posts()) :
  while ($tech_posts->have_posts()) : $tech_posts->the_post();
    //order code
  • What do you mean by "it is not working"? Don't you get any posts or what is the problem?. Can you verify that the lp_order post type really exists? Try checking the return value from get_post_types() and update your question with this information. – Cyclonecode Sep 12 at 12:32
  • yes brother i also check @Cyclonecode – bca tech Sep 12 at 12:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.