Page 1 of 1
Search plugin is blank
Posted: Wed Aug 17, 2022 2:28 pm
by cobber
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.
Re: Search plugin is blank
Posted: Fri Aug 19, 2022 9:18 am
by Edi
Are there any errors in the search console?
Re: Search plugin is blank
Posted: Tue Aug 23, 2022 10:39 am
by cobber
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');
}
}
Re: Search plugin is blank
Posted: Mon May 26, 2025 3:37 pm
by jloft42
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.