Heeey @Alkis that website is looking awesome!
The Tainacan Search Bar block has a relatively simple logic, it just redirects a search to the items list search page. If you can’t use the block, maybe you could just replicate its HTML in the area that you are interested. Something like:
<div class="wp-block-tainacan-search-bar is-style-default" data-module="search-bar">
<div class="tainacan-search-container">
<form style="max-width:50%" id="tainacan-search-bar-block" action="http://localhost/minhas-fotos" data-queryparam="search" method="get">
<input style="border-color:" id="tainacan-search-bar-block_input" label="Search" placeholder="Search">
<button class="button" type="submit">
<span class="icon">
<i>
<svg style="fill:" width="24" height="24" viewBox="-2 -2 20 20"><path d="M0,5.8C0,5,0.2,4.2,0.5,3.5s0.7-1.3,1.2-1.8s1.1-0.9,1.8-1.2C4.2,0.1,5,0,5.8,0S7.3,0.1,8,0.5 c0.7,0.3,1.3,0.7,1.8,1.2s0.9,1.1,1.2,1.8c0.5,1.2,0.5,2.5,0.2,3.7c0,0.2-0.1,0.4-0.2,0.6c0,0.1-0.2,0.6-0.2,0.6 c0.6,0.6,1.3,1.3,1.9,1.9c0.7,0.7,1.3,1.3,2,2c0,0,0.3,0.2,0.3,0.3c0,0.3-0.1,0.7-0.3,1c-0.2,0.6-0.8,1-1.4,1.2 c-0.1,0-0.6,0.2-0.6,0.1c0,0-4.2-4.2-4.2-4.2c0,0-0.8,0.3-0.8,0.4c-1.3,0.4-2.8,0.5-4.1-0.1c-0.7-0.3-1.3-0.7-1.8-1.2 C1.2,9.3,0.8,8.7,0.5,8S0,6.6,0,5.8z M1.6,5.8c0,0.4,0.1,0.9,0.2,1.3C2.1,8.2,3,9.2,4.1,9.6c0.5,0.2,1,0.3,1.6,0.3 c0.6,0,1.1-0.1,1.6-0.3C8.7,9,9.7,7.6,9.8,6c0.1-1.5-0.6-3.1-2-3.9c-0.9-0.5-2-0.6-3-0.4C4.6,1.8,4.4,1.9,4.1,2 c-0.5,0.2-1,0.5-1.4,0.9C2,3.7,1.6,4.7,1.6,5.8z"></path></svg>
</i>
</span>
</button>
</form>
</div>
</div>
The most important there is:
- The
action
on the <form>
tag. It will point to your collection or repository items list page;
- The
data-queryparam="search"
, also in the <form>
tag. It tells how the search value will be passed to the page (something like search=potato
or s=potato
), because some search plugins may change this…
- The IDs should be the same, because they are used in the script that redirects the search;
- Finally, the
data-module="search-bar"
. This is the guy that tells our lazy-loader script that there is a search bar here, so if it finds this information in the document, it will load the script. More specifically, this is the script: tainacan/theme.js at develop · tainacan/tainacan · GitHub
Let me now if you need more help with this!