Numbered Search Results in WordPress

I needed to show search results in an ordered list for a project I am working on and was very surprised to discover how involved this is for paginated search results. Showing the results using a regular ordered list starts the list numbering over at 1 on each new page of results, even though the next set of results was being displayed.

After some horribly hacky solution involving grabbing the page number from the URL and hard coding the number of posts per page, I was led in the right direction by NicktheGeek at StudioPress who suggested getting the number of posts per page from the query string and using the paged value to get the numbers dynamically before applying the math to get the list numbers to display correctly.

A bunch of CSS was required to make the list numbers look like they were actually generated by an <ol> tag. Styling will vary depending on your theme, but one thing that may help if things are looking messed up is to display the post/page titles and contents inline.

CSS:

PHP:
For non-Genesis themes, leave out the genesis_ lines.

Genesis: Remove/Change post info/post meta

Please note that you do not need to remove the functions before editing them. Hat tip to jim 🙂

Genesis: Custom loop arguments

Genesis: Custom Page Template

Genesis: Default Post Thumbnail

Genesis Grid Loop

New in Genesis 1.5

CSS:

PHP:

Genesis: Custom search button and search form text

Genesis Footer Content

Customize the footer text

Remove Footer Content

This will remove the footer credits text and ‘back to top’ link.

Replace Footer With A WordPress Custom Menu

This will replace the default footer with credit text and a WordPress custom navigation menu.
Ex. © Copyright 2011 LBnuke. All rights reserved.    Home | About | Archives | Contact

Genesis: Custom superfish arguments

Genesis: Parent Page Templates

The template below displays child posts below any page content of the parent post with featured image thumbnails. Images are linked to child page. If there is an image before any page content on the child page, it will not display in order to avoid breaking the layout on posts with large images.

To display the images on the right side, change the class on this line (~ line 17):

from

to

Parent Page Template:

functions.php:

Changelog
2/23/2011: Added links to featured images and ob_end_clean() to word count function.

genesis();

This is what happens when you call the genesis() function:

Define Genesis default options

Available Options:

Remove Genesis Distractions

Remove Genesis options page

Remove in-post layout and SEO boxes

Unregister Site Layouts

Genesis: Disable SEO Functions