Skip to content

Refactor search page to match category page. #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

scottgonzalez
Copy link
Member

This is an attempt to fix #61.

I think the category styling is specific to the category pages because the search page and category page should be using the same markup now, but they look different (I honestly haven't looked at the CSS yet).

This introduces a regression in result ordering. I'm not sure the best way to get the old behavior without duplicating the template. Perhaps with an output buffer? I'll add a line comment where the regression occurs so that everyone can see what I'm referring to.


if ( preg_match('@' . $searchquery . '@i', $post->post_name) ) :
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is bubbling entries with names that contain the search term to the top. The new code just calls out to the content template, so we lose the sorting. @nacin is there a way to weight the sort results so that we don't need to do this?

@jzaefferer
Copy link
Member

Looks pretty good.

@nacin
Copy link
Member

nacin commented Aug 31, 2012

@nacin is there a way to weight the sort results so that we don't need to do this?

Yes. We can do this without messing with the template. Want to merge this and I'll revisit after?

@scottgonzalez
Copy link
Member Author

rebased and merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Cleanup search result template
3 participants