Hi,
You suggest this:
Multiple Search Forms, – I don’t want all my results looking the same!?
For example, if a Search Form had an ID of 14, then I would create a template in this folder called 14.php
– that only this Search Form could use for displaying its results – the file would then be located: wp-content\themes\your-theme-name\search-filter\14.php
The problem is that not always the ID is known. For example I work in local server, the when I upload the page to production the ID’s is different.
My first attemp was:
result.php
<?php
while ($query->have_posts())
{
$query->the_post();
?>
<?php
if (is_page_template("custom-mycpt.php"))
get_template_part ('templates/item','mycpt');
else
get_template_part ('templates/item','posts');
?>
<?php
}
?>
The problem is using Ajax when refresh ‘is_page_template’ don’t works correctly.
My second attemp is:
if ($query->query['post_type'][0] == 'mycpt')
get_template_part ('templates/item','mycpt');
else
get_template_part ('templates/item','posts');
This works fine but I don’t know is a good solution.
Thanks.