• Hello,
    I am a happy customer of the Theme EDUMA. And I have the following question:
    You are designing a theme and I want to show the “last created lessons” with their respective permalink, but I don’t get it with a WP query. I have something like this:

    
       <?php
    $args = array('
    orderby'=> 'id',
    'order' => 'DESC',
    'post_type' => 'lp_lesson',
    'posts_per_page' => 5,
    'post_status' => 'publish'
    );
    $q = new WP_Query($args);
    
    while ( $q->have_posts() ) : $q->the_post();
    
    ?>
    
        <li>
            <a href="<?php the_permalink(); ?>">
              <?php the_title(); ?>     
            </a>
    
        </li>
        <?php
    endwhile;
    wp_reset_query();
    
    

    But I don’t get the permalink for every lesson.

  • The topic ‘Show the “Last published lessons” in frontEnd’ is closed to new replies.