bioneural.net site preferences

Accessibility

Toggle width/ text size:

style

Default/Alternate

Suits visual impairment, mobile devices

Styling

Change the theme:

layout

NB: may reduce functionality

Link behaviour

Links with an icon are off-site:

links

Right-click any link to optionally open in a new window or tab


Pages and searching in WordPress 2.5

WordPress 2.5 lets you search across pages (non-blog entries) as well as posts. This is undoubtedly a good thing, but if your pages are liable to turn up in site searches you might want to make a couple of changes to stop page content from swamping your results screen and improve appearances if you use category icons.

In WordPress search results post content is displayed up to the <!--more--> tag:

The rest of the post continues, but when viewed on the non-single/non-permalink web page such as archives, categories, front page, and searches, the post is shown as an excerpt to the more point.

Pages don't usually have a more tag, because there is no excerpt or "teaser" destined for use in a feed. Thus when a page appears in a search results it will display in its entirety.

Furthermore, because I'm using the Category Icons plugin, post titles will display alongside the category icon for ease of identification. Since pages don't usually have a category, they will show indented with no icon.

Here is a search for "architect", showing an iconless page result occupying the screen:

before.jpg

With the addition of <!--more--> to the top of each page, and the use of an icon for Uncategorized content (assuming all posts are categorised) we get this:

after.jpg

Much more usable and informative.

1 response to Pages and searching in WordPress 2.5


  1. 1 Submarine

    Hi Bruce,

    you can use icons with pages, thanks to the Category Icons plugin and Page Category Plus plugin. I wrote a post about it.

Something to say?

Comments may be moderated (e.g. no commercial promotion), are subject to spam filtering, and should be relevant to this post—otherwise make contact.

Usable tags include <a href=""> <blockquote> <em>. Select any text and click to quote.