Last active
December 5, 2024 08:35
-
-
Save dcooney/9b037efbd166b4dba5ae to your computer and use it in GitHub Desktop.
Exclude posts from Ajax Load More
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 | |
$features = array('1, 1530', '1514', '1471'); // Array of posts | |
if($features){ | |
//Implode the posts and set a varible to pass to our exclude param. | |
$post__not_in = implode(",", $features); | |
} | |
echo do_shortcode('[ajax_load_more post__not_in="'.$post__not_in.'"]'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment