The problem with your approach is that post’s content pretty much ignored in WordPress query architecture. It is meant to be textual information, as opposed to technical meta information.
You have several options:
-
Try to modify raw SQL of query request through filters, such as
posts_where
. -
Assign school name to custom field and use custom fields parameters in query (much enhanced in upcoming 3.1 version of WP).
-
As per hakre’s suggestion create custom taxonomy and assign schools to posts as its terms.
Related Posts:
- Export WordPress Posts and Meta Information in CSV format
- how to get permalink using sql
- Use Cron to modify posts via sql
- Sql syntax error
- get posts and postmetas in assoc array
- How do I find which articles are missing a featured image in The WordPress database?
- Bulk update post slugs through database
- Multiples Empty Posts were created and cannot delete them
- Delete WordPress posts from URL list sql query
- SQL query to retrieve all the records that have not indicated category
- How to verify wp user password by sql query in wp? [closed]
- Get ALL post ID’s export list (Only id’s. Php or sql not important )
- WordPress website loads more posts than expected
- SQL Command for restoring trashed comments
- How to Assign / Move all Deleted post to a category
- Migrate posts from category and sub-category via SQL
- SQL Bulk Move old posts by one author to another category
- Export all posts to import as product items
- How can I get posts from 9/13/11 to today with SQL? [closed]
- Change published date and time using SQL query for page in every 5 hour
- SQL DELETE multiple post_meta on single and multi-sites
- Bulk find & replace on WordPress posts/pages (minus image paths)
- SQL query: select duplicate posts – but using duplicate meta [duplicate]
- WordPress MySQL Search and replace with wildcard?
- Using a meta_value or postdate to to query and orderby
- insert post fails after multiple postings
- Adding wordpress posts using phpmyadmin
- How to run select query of post with category and tags?
- Export Posts with specific custom fields by sql
- Query to get data of a post, if in category?
- Can’t create posts with WP DB Abstraction Plugin
- SQL query to remove first image in all posts
- Delete junk text from all the post using my sql command
- Special Query: Title, Terms, Content – %LIKE%
- If meta_key exists then don’t select this post?
- The page that displays Posts on homepage
- Change permalinks in posts via SQL
- Batch Scanning and Deleting Empty WordPress Posts
- Post/Page Preview Template
- Post slugs and images cannot have same name?
- Convert custom fields to post categories
- Hide password protected posts in admin
- Most viewed post for the last 2 days using WP_Query
- This AJAX Code Doesn’t Work – Looking for elegant solution
- Do I use custom post type or something else?
- How To Add Perfect Apostrophe And Quotation Mark In WordPress Posts?
- Custom post type permalinks breaking due to 3.1 bug fix
- Locked/Unlocked in title
- How to permanently delete a post meta entry?
- Loop through all product posts?
- Inserting custom data to the_post() during loop
- Get Image tag from content of post
- Visting slug for ‘post’ post type shows 404 not archive?
- Remove Custom Post Type Slug and add Custom Taxonomy to Permalink Structure?
- Automatically create a new page daily with last three posts
- Add filter to the end of the post
- Indirect modification of overloaded property WP_Post::$ancestors has no effect
- How do I change the location of post-specific information?
- Benefits to using semantic HTML in post content? [closed]
- How can I insert a new markup element after 4 posts automatically? [closed]
- the_excerpt is displaying excerpts of every post
- Using wp_tag_cloud with only posts published in specific year
- Post: how to set created date after post has been published [closed]
- WordPress loop not working on static front page
- Sidebar on single.php not showing up
- remove all custom post created
- Hide content from Post Preview
- How to get the next and previous image title from attachment or gallery?
- Pagination for posts inside a specific category
- Creating a redirect option for current page url
- How to edit a custom theme?
- WordPress posts have a different URL to the index
- How to put the author of the post in the comments?
- Blog posts pagination not working
- unable to write to the database while uploading images
- Restricting displayed posts to posts from only select authors
- How can I create a Survey Form in WordPress that users can fill in and then submit the entire survey contents as a post?
- How to Make my Homepage Display a Single Specific Post?
- wp_query args with relation
- Creating Ordered Query using Meta_key
- WordPress each user has each content for a page,how to do that?
- Fixing the WP Post Object for Custom Route
- How to change post template via url?
- How to remove related post from home page
- Is there a Standard Format for Clean URLs for Archives of Custom Posts?
- Send/Publish a Post front end
- How do I list categories and the common categories for posts beneath those categories?
- Post restoration
- Insert new post for each user infinite loop error
- Last three posts not being put in order by date. How to fix this?
- WordPress sub-posts and permalinks
- Assign a link of a post to that contains that post?
- wp_query posts sorting doesn’t work
- Show List of Posts With Comments Open
- When and how will php code in a user made WordPress page be executed?
- There is a page on my website that doesn’t show in the Pages section of WordPress [closed]
- Difficulty hiding a span per a body class within WordPress
- Onclick open posts displayed in slider in a popup [closed]
- Listing category and its posts one by one
- How to get post ID after removing that post?