Forums › Forums › Search & Filter Pro › Taxonomy problem and Reset Filters
Tagged: CPT Injector, Divi
- This topic has 44 replies, 3 voices, and was last updated 7 years ago by Ross.
-
Ross Moderator(Private) October 5, 2017 at 9:04 pm #135027
So, we now know that plugin, stops injecting the layout when there are not results found (breaking default WP conventions on which template should be shown when there are no results).
So I thought I would go about it a different way, and it looks like (locally at least) its working fine, please follow:
1) In the
CPT layout injector
settings, disable the templates you have assigned to the archives – soarchive template
is set to-- none --
. [THIS IS IMPORTANT]2) We will have to create all these archives manually, for now we will do erasmus trips milan archive.. so start by creating a new file
archive-erasmus_trips_milan.php
in the child theme – inline with the WP way of customising archives3) the contents of this file should simply be:
<?php get_header(); ?> <div id="main-content"> <?php echo do_shortcode('[et_pb_section global_module="16841"][/et_pb_section]');?> </div> <!-- #main-content --> <?php get_footer(); ?>
Notice the ID of the layout is being used from divi library:
16841
– which is the archive layout for erasmus trips milan4) Thats it! Test https://www.erasmuspeople.com/erasmus_trips_milan/?s=afsdfs and notice, it will say “no results” but in the CORRECT template 🙂
Let me know how you get on, and if the above makes sense! You will need to repeat this for all your archives that have S&F searches on them.
Best
-
AuthorPosts