excluding posts that contain specific string
I’ve done some searching but have come up empty so far. I’m attempting to pull posts from the database that do not contain a specific string.
For example, let’s say that want to pull posts from the database but with the condition that they do not have the string ‘youtube.com’ within the post content.
Any ideas how I can achieve this?
This is my current query, without any method of excluding a string.
$posts = query_posts('showposts='.$numposts.'&orderby=rand');
Any ideas are welcome!
- The topic ‘excluding posts that contain specific string’ is closed to new replies.