Last active
September 29, 2020 19:42
-
-
Save qstudio/6c9624323940dd4c11c82a2e1bf15ecb to your computer and use it in GitHub Desktop.
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
// return an array ## | |
return [ 'post' => [ | |
'config' => [ | |
// run context->task ## | |
'run' => true, | |
// context->task debugging ## | |
'debug' => false, | |
], | |
// get_posts() ## | |
'query' => [ | |
// markup ## | |
'markup'=> [ | |
'template' => | |
'<div class="pb-1 col-12 the-posts"> | |
<div class="row"><h5 class="col-12 mt-2">{{ total }} Results Found.</h5></div> | |
<div class="row p-3">{{ results }}</div> | |
<div class="row"><div class="col-12">{{ pagination }}</div></div> | |
</div>', | |
// post template ## | |
'results' => | |
'<div class="col-12 col-md-6 col-lg-4 col-xl-3 p-0"> | |
<div class="card h-100"> | |
<a href="{{ post_permalink }}" title="{{ post_title }}" class=""> | |
<img class="lazy fit card-img-top" style="height: 200px;" data-src="{{ src }}" src="" /> | |
</a> | |
<div class="card-body"> | |
<h5 class="card-title"> | |
<a href="{{ post_permalink }}"> | |
{{ post_title }} | |
</a> | |
</h5> | |
<p class="card-text">{{ post_excerpt }}</p> | |
</div> | |
<div class="card-footer"> | |
<small class="text-muted">Posted {{ post_date_human }} ago</small> | |
<small class="text-muted">in <a href="{{ category_permalink }}" title="{{ category_name }}">{{ category_name }}</a></small> | |
</div> | |
</div> | |
</div>', | |
// no results ## | |
'default' => | |
'<div class="col-12"><p>We could not find any matching posts, please check again later.</p></div>' | |
], | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment