I have a S&F Form and need to find a way to exclude 3 posts from the results programmatically. I know the form settings have the exclude options, but the 3 posts will be changing, so I can’t set them in the settings.
I have a function that retrieves the 3 IDs I need to exclude and puts them into an array. So trying to figure out a way to say…For a specific S&F form (because I have multiple S&F forms and only need this for one specific one), exclude these 3 posts from results. I feel like there is a filter or hook to do this, I’m just not sure how to create it.
So lets say my S&F form has an ID of 287
Then my function that returns an array of post ID’s is excluded_posts()
. I’ve tested my function and does properly return an array of the 3 needed IDs
Any help would be greatly appreciated.