Forums › Forums › Search & Filter Pro › Slugs, templates, and secondary loops
- This topic has 8 replies, 2 voices, and was last updated 9 years, 3 months ago by Anonymous.
-
Anonymous(Private) July 19, 2015 at 5:31 am #21660
Apologies for the cryptic title. I honestly don’t know what to call this.
I have an archive for an “Organizations” custom post type. On this archive I’m including its own search filter form. I have another template called results-organizations.php which is where I want results to be redirected.
On the archive-organizations.php page I have another loop at the top of the page that displays two “featured” organizations. Because I originally had my organizations’ search filter form’s tag set to “organizations”, the archive page was actually using the results-organizations.php template, thus not even reading the “featured organizations” loop from the archive page. My guess is that with the organizations slug, the permalink structure is getting a little confused and rather than site.com/organizations using archive-organizations.php, it uses results-organizations.php… even though nothing has been searched or filtered!
After removing the slug so there is no slug at all anymore, everything but the pagination works.
An easy work-around might be simply adding the “featured organizations” loop to the results template, but that just seems to hackish to me, and I’d like to understand what is actually happening here.
-
AuthorPosts