How to insert a simple search bar into a tiddler

I’ve searched for coding to place a simple search bar into a tiddler. I’ve found plenty of advanced search bars, but they are too involved for my use.

I attempted to find the coding for the search bar in the sidebar, but was not able to find it. I remember seeing a post here with the code in it, but couldn’t find that either.

All I need is the search bar so that visitors to the site can enter a word or phrase, and the search bar will search all “posts”.

1 Like

Try this:

{{$:/core/ui/SideBarSegments/search}}
4 Likes

This works, but is there a way to make the “Advanced Search” not available?
Sorry for reopening this, but this was the best post I could find for my question.

Give this a try:

<style>
.mySearch button[title="Advanced search"] { display:none; }
</style>
@@.mySearch {{$:/core/ui/SideBarSegments/search}}@@

Notes:

The CSS hides the button that has a “title” (aka, “tooltip”) of “Advanced search”, but only when it is inside a wrapper element with class=“mySearch”. This allows you to have a customized search without affecting the standard sidebar search contents.

enjoy,
-e

1 Like