Forked from AbhishekGhosh/Restore original Post Data.php
Created
October 21, 2021 22:14
-
-
Save hansschuijff/b91bd9db883b830e56dcf748021bcd5f to your computer and use it in GitHub Desktop.
Restore original Post Data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$the_query = new WP_Query( $args ); | |
if ( $the_query->have_posts() ) { | |
echo '<ul>'; | |
while ( $the_query->have_posts() ) { | |
$the_query->the_post(); | |
echo '<li>' . get_the_title() . '</li>'; | |
} | |
echo '</ul>'; | |
} else { | |
} | |
wp_reset_postdata(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment