Search only returns 10 results, always. Why?

564 views
Skip to first unread message

texburgher

unread,
Jul 5, 2013, 10:36:20 AM7/5/13
to tumblr...@googlegroups.com
I think I have search properly implemented in my theme, but I have two reasons to believe it's wrong:

  1. Search only returns 10 results. I get that it's only searching by tag (and I'm mystified by why there's a separate result than tagged/searchterm than for search/searchterm), but that not withstanding, I'm definitely searching where I have scores of posts tagged the same, and I still only get 10 results. Here's a sample search: http://www.texburgher.com/search/writing
  2. On my theme's theme garden page, under Features, search does not appear. http://www.tumblr.com/theme/37021 I know Tumblr checks for features automatically, so I assume I'm doing something wrong or it would register search as a feature.
Tumblr's theme developers page gives no usage example for {block:SearchPage}. Here's how I have it implemented in my theme. Any ideas about why I'm seeing the two symptoms above? Thanks.
<pre>
                {block:SearchPage}
                    <li class="post text">
                   <h3>
                            {block:NoSearchResults}
                                {lang:Sorry no results for SearchQuery 2}
                            {/block:NoSearchResults}
                            {lang:Your search for SearchQuery returned SearchResultCount results 2}        
                        </h3>
                    </li>
                    <br />
                {/block:SearchPage} 
</pre>

texburgher

unread,
Jul 5, 2013, 10:37:09 AM7/5/13
to tumblr...@googlegroups.com
Ignore <pre> tags. BTW. Those obviously aren't in the actual theme code. :)

Tich Showers

unread,
Oct 23, 2013, 7:09:31 AM10/23/13
to tumblr...@googlegroups.com
Search will return as many results as you have set to the amount of posts you have set per page in your options. Default it is set to 10. Your extra results are found on http://www.texburgher.com/search/writing/page/2 . This is completely similar to how tumblr manages regular pages.

The gist of search pages is this:

Search page is like a regular page, except all you do is filter for a certain word or set of words. Eliminating other posts. All the extra search page block does is add a couple of lines that you wouldn't show on your regular page to give information, like if there are search results and how many. You implemented it correctly.

Long story short, your search results are paginated in the same amount as the amount of posts per page you have set for your blog.

Michael Theriot

unread,
Oct 31, 2013, 11:54:27 PM10/31/13
to tumblr...@googlegroups.com
For a few weeks I noticed the search function was not working correctly. It seemed to be just a duplicate of the /tagged/ page but the pagination was bugged. I tested on a few other blogs and for whatever reason the 'next page' link wouldn't appear when there was indeed another page and you could only access these pages via URL.

Recently I've noticed the search feature was fixed with no change on my end, and the pagination seems to be working.

So I think texburgher's issue was that it was only returning the first page of results with no link to the second, but after checking his blog it seems to be working fine now.
Reply all
Reply to author
Forward
0 new messages