Search plugin is blank

Post Reply
User avatar
cobber
Master Bludit
Posts: 78
Joined: Sun Feb 28, 2016 10:15 am
Location: Scotland
Has thanked: 21 times
Been thanked: 5 times

Morning,

I'm trying to use the search plugin within a theme but am hitting problems.

Is there a preferred way to use the plugin in a new theme.
User avatar
Edi
Site Admin
Posts: 3115
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 76 times
Been thanked: 117 times
Contact:

Are there any errors in the search console?
clickwork.ch, digitale Projekte
Bludit-Tipps, Erklärungen und Anleitungen
User avatar
cobber
Master Bludit
Posts: 78
Joined: Sun Feb 28, 2016 10:15 am
Location: Scotland
Has thanked: 21 times
Been thanked: 5 times

Good morning Edi

No errors as far as I can see. I have been wondering if there is a conflict because I am using the following code in my theme index file.

Code: Select all

      if ($page->custom('template')) {  
        
            // If a custom template is specified 
            if ($WHERE_AM_I=='page') {
                include(THEME_DIR_PHP.$page->custom('template').'.php');
            } else {
                include(THEME_DIR_PHP.'home.php');
            }   
    }
    else {
           // If not
            if ($WHERE_AM_I=='page') {
                include(THEME_DIR_PHP.'page.php');
            } else {
                include(THEME_DIR_PHP.'home.php');
            }    
       }
jloft42
Jr. Bludit
Posts: 3
Joined: Tue May 13, 2025 12:34 pm

Was there a resolution/fix to this?

I am having a similar problem. Except I am using the advanced options template field and basically the search stops processing when it encounters the $page->template() —

Search chokes on any $page->XXXXX directive that comes before the page.php or the home.php are invoked.

It only works if the $page->template() comes after the home.php or page.php are invoked. Which does no good if those are the pages I want to change for the theme/template.
Post Reply