Add search to custom theme

Post Reply
susannemcom
Ssr. Bludit
Posts: 26
Joined: Mon Sep 30, 2019 12:43 pm

Hi all
Is there anyone who could let me know how to add a search form to my theme, using the default search plugin that comes with Bludit? Is there a snippet somewhere that I haven't found?
Thanks in advance!
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

The plugin works in themes with a sidebar.

You also can use the following:

Code: Select all

<?php
   // Class name of the plugin
   $className = 'pluginSearch';

    // Get the Plugin-Object
   $plugin = getPlugin($className);

   // Print the plugin label
   echo $plugin->label();

   // Execute the hook siteSidebar of the plugin and print it
   echo $plugin->siteSidebar();
?>
See for this the documentation:

https://docs.bludit.com/en/dev-snippets/plugins
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
susannemcom
Ssr. Bludit
Posts: 26
Joined: Mon Sep 30, 2019 12:43 pm

Thank you! Any ideas on how to create a search result page? Do I need a template for that? I can't see that for example, the Andy theme has one, but the search results show up there. What do I need to do?
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

A search must at least contain 5 characters.

Please see also

viewtopic.php?f=14&t=1803
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
User avatar
LRAM
Master Bludit
Posts: 199
Joined: Sat Sep 24, 2016 4:02 pm
Location: France
Has thanked: 22 times
Been thanked: 2 times
Contact:

Hi
as for me, the search feature isn't wortking at all
for example
https://sucrepop.com/Ukulele/search/beatles

give me no results, where I should have many
https://sucrepop.com
Candies for the ears
Post Reply