I would like to have a search results page with results from 8 different channels.

The results depends on the channel name.

For instance

{if channel_name = channel1} Display {custom field} - {custom field 2} And additional text here. {/if}

{if channel_name = channel2} {title} - {excerpt} - More stuff you don't see unless the results have that channel. {/if}

{if channel_name = channel3} {custom field 3} - {custom field 4} {/if}

and so on.... Any idea on how to do this. It's not clear in the documentation. Thanks!

1 Answer 1


Did you try these conditionals and it didn't work? I would expect that or channel_short_name to work just fine in a conditional. In my test using Supersearch 2.1.3 and EE 2.7.1 this conditional works as expected:

    <div class="search-result">
        {if channel_short_name == "articles"}
            <p>This result is from the articles channel</p>
        {if channel_short_name == "recipes"}
            <p>This result is from the recipes channel</p>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.