• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

default search type: "everything" to "threads and posts"

Jake Bunce

XenForo moderator
Staff member
#2
You can change the Advanced search link in the search menu by editing this template:

Admin CP -> Appearance -> Templates -> search_bar

Replace this:

Code:
<a href="{xen:link search}" class="advSearchLink">{xen:phrase advanced_search}...</a>
with this:

Code:
<a href="{xen:link search, '', 'type=post'}" class="advSearchLink">{xen:phrase advanced_search}...</a>
Now it will link to the Search Threads and Posts page instead of Search Everything.

You can enable Display results as threads by default by editing this template:

Admin CP -> Appearance -> Templates -> search_form_post

Replace this:

Code:
	<dl class="ctrlUnit">
		<dt></dt>
		<dd><label for="ctrl_group_discussion"><input type="checkbox" name="group_discussion" id="ctrl_group_discussion" value="1"{xen:checked '{$search.group_discussion}'} /> {xen:phrase display_results_as_threads}</label></dd>
	</dl>
with this:

Code:
	<dl class="ctrlUnit">
		<dt></dt>
		<dd><label for="ctrl_group_discussion"><input type="checkbox" name="group_discussion" id="ctrl_group_discussion" value="1" checked="checked" /> {xen:phrase display_results_as_threads}</label></dd>
	</dl>
Now that box will be checked on the Advanced search page by default.