# Searching public topics and PMs simultaneously and set this option as the default

**URL:** https://meta.discourse.org/t/searching-public-topics-and-pms-simultaneously-and-set-this-option-as-the-default/71017
**Category:** Feature
**Tags:** search
**Created:** [September 29, 2017, 10:53am UTC](https://meta.discourse.org/t/searching-public-topics-and-pms-simultaneously-and-set-this-option-as-the-default/71017 "2017-09-29T10:53:24Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [December 20, 2025, 8:19am UTC](https://meta.discourse.org/t/searching-public-topics-and-pms-simultaneously-and-set-this-option-as-the-default/71017/10 "2025-12-20T08:19:10Z")

</div>

> [@NateDhaliwal](#):
>
> Hmm… what about something like:
> 
> ```plaintext
> document.addEventListener("DOMContentLoaded", () => {
> if (window.location == "/search") {
> const searchBar = document.getElementById("someId");
> searchBar.value = "in:all";
> }
> });
> 
> ```

I couldn’t get that to work unfortunately!

> [@Moin](#):
>
> I just wanted to quickly cross-link similar feature requests:
> 
> - [How to “search public topics and PMs simlutaneously” by default?](https://meta.discourse.org/t/how-to-search-public-topics-and-pms-simlutaneously-by-default/365093)
> - [Search both public topics and PMs by default](https://meta.discourse.org/t/search-both-public-topics-and-pms-by-default/71017)

Good point! I missed the existing topics. I’ve flagged them to all be merged.

---

_[View the full topic](https://meta.discourse.org/t/searching-public-topics-and-pms-simultaneously-and-set-this-option-as-the-default/71017)._
