Created
February 28, 2019 09:30
-
-
Save insaurabh/db14ef067033b78837fc4e6fc351c1d2 to your computer and use it in GitHub Desktop.
Get entries based on custom field in twig template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% set sponsoredentries = craft.entries({ id: 'not ' ~ entry.id }) | |
.section(["articles", "sneakers"]) | |
.lightswitchFieldHandle(1) | |
.limit(10) | |
%} | |
{% for item in sponsoredentries %} | |
<div class="content"> | |
<p>{{ item.title }}</p> | |
</div> | |
{% endfor %} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment