Created
February 6, 2017 14:45
-
-
Save JamesHusband/4a4733cc0eacb45ebbe759e56b8f71a3 to your computer and use it in GitHub Desktop.
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
function lsmwp_post_limter($ids, $in, $count) { | |
$i = rand(1,$count); | |
if ($i <= $in) { | |
return($ids); | |
} | |
} | |
$limit_posts_2_5 = array('28741', '29811'); | |
$limit_posts_1_3 = array('111'); | |
$excluded_posts = lsmwp_post_limter($limit_posts_2_5, 2, 5); | |
$? = lsmwp_post_limter($limit_posts_1_3, 1, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment