pah2
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Disable searching of pages?Okay, I’ve figured it out. In search.php, before The Loop, i.e. before the call to have_posts(), you add the following:
<?php $posts = query_posts($query_string . '&post_type=post'); ?>This will restrict the “posts” returned to only those that are actually posts.
Forum: Fixing WordPress
In reply to: Pages returned in search resultsOkay, I’ve figured it out. You add the following before The Loop:
<?php $posts = query_posts($query_string . '&post_type=post'); ?>This will restrict the “posts” returned to only those that are actually posts. (If you want to only show pages, set post_type=page.)
If you want posts and pages returned together, but themed differently, you can just check the individual $post->post_type within The Loop.
Forum: Fixing WordPress
In reply to: Pages returned in search resultsThis behaviour is still default in 2.5.1, with no obvious way to turn it off.
Forum: Fixing WordPress
In reply to: Pages returned in search resultsI can’t get the plugin to disable searching of pages.
SearchEverything uses the ‘posts_where’ filter to add searching of pages. I might be able to use this filter to first work out what SQL is being generated by WordPress (I certainly have no hope of working it out by looking at the 600 line monster /wp-includes/query.php get_posts() function). Then I might be able to use the filter to remove the offending part of the SQL.
Unfortunately I don’t have time to muck around with this now, so I’m still hoping that someone can come forward with a config- or theme-based solution. Maybe someone who is using WordPress as a CMS, the target user of this new feature?
Forum: Fixing WordPress
In reply to: Disable searching of pages?I am having this problem too, but can’t find any solution.
Forum: Fixing WordPress
In reply to: what_to_show option changed in 2.1?Apparently this was “expensive, flaky, and unpopular”:
Forum: Fixing WordPress
In reply to: what_to_show option changed in 2.1?I wonder if this is related to the fact that I can’t get the Custom Query String plugin to show 3 days on my front page – instead it shows 3 posts?
Forum: Fixing WordPress
In reply to: Page URI case-sensitivityI have raised a ticket for this in trac:
Forum: Fixing WordPress
In reply to: Page URI case-sensitivityIs this a suitable bug for posting on WordPress Trac?
Forum: Fixing WordPress
In reply to: Page URI case-sensitivityI can confirm this isn’t just a problem with my plugins. Here is a wordpress.com page:
http://matt.wordpress.com/about/
And here is it not working:
Forum: Fixing WordPress
In reply to: Page URI case-sensitivityMore info:
I have a page with the slug “GrimmReality” and post ID = 279. The following do not work:
http://pah2.golding.id.au/GrimmReality/
http://pah2.golding.id.au/index.php?pagename=GrimmReality
http://pah2.golding.id.au/index.php?p=279And, in fact, if I edit the page, the Post Preview displays the 404 page!