Last active
June 28, 2024 17:18
-
-
Save beaverbuilder/d6830e30fda195d8b8c48b7fda7f1647 to your computer and use it in GitHub Desktop.
This snippet is used on the following knowledge base article - http://kb.wpbeaverbuilder.com/article/577-create-a-card-layout-for-posts-themer
This file contains hidden or 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
[wpbb-if post:featured_image] | |
<a class="post-card-image-link" href="[wpbb post:url]"> | |
<div class="post-card-image" style="background-image: url([wpbb post:featured_image size='full' display='url']);"></div> | |
</a> | |
<div class="post-card-content"> | |
<a class="post-card-content-link" href="[wpbb post:url]"> | |
<header class="post-card-header"> | |
<span class="post-card-category">[wpbb post:terms_list taxonomy='category' separator=', ' linked='no']</span> | |
<h2 class="post-card-title">[wpbb post:title]</h2> | |
</header> | |
<section class="post-card-excerpt"> | |
[wpbb post:excerpt length='12' more=''] | |
</section> | |
</a> | |
</div> | |
[wpbb-else] | |
<div class="post-card-content"> | |
<a class="post-card-content-link" href="[wpbb post:url]"> | |
<header class="post-card-header"> | |
<span class="post-card-category">[wpbb post:terms_list taxonomy='category' separator=', ' linked='no']</span> | |
<h2 class="post-card-title">[wpbb post:title]</h2> | |
</header> | |
<section class="post-card-excerpt"> | |
[wpbb post:excerpt length='46' more=''] | |
</section> | |
</a> | |
</div> | |
[/wpbb-if] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment