Steps:
- Create PHP Code Snippet

2. Add the below code:

<?php
$args = array(
'post_type' => 'page',
'post_status' => 'publish',
'posts_per_page' => 3,
'orderby' => 'date',
'order' => 'DESC'
);
$query = new WP_Query($args);
$page_list = "Here are the 3 most recent pages:<br>";
if (!$query->have_posts()) {
$page_list .= "No pages found.<br>";
} else {
while ($query->have_posts()) {
$query->the_post();
$page_list .= "- <a href='" . get_permalink() . "'>" . get_the_title() . "</a><br>";
}
wp_reset_postdata();
}
echo $page_list; // Switch to return for proper shortcode behavior
?>
3. Ensure that the PHP Code Snippet is ACTIVE:

4. Then Create Popup

5. In the Popup update the details:

[xyz-ips snippet="recent-pages"]
6. Add Triggers and other Popup settings:





Once done then click on ‘Update’ button.
7. Bingo! The popup for recent 3 pages is done and will appear like below when the webpage is loaded:
