Dynamic Shortcodes Listing Tutorial Resources
Here you find all the resources used in my Dynamic Shortcodes tutorial on YouTube
Shortcodes I use in the tutorial
Code to embed a YouTube video dynamically in a template
(use it into a Power Shortcode) Replace post:youtube_ID with your actual video ID source.
<style>
.yt-video-container {
position: relative;
width: 100%;
padding-bottom: 56.25%; /* 16:9 aspect ratio (9/16 = 0.5625) */
height: 0;
overflow: hidden;
}
.yt-video-container iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
</style>
<div class="yt-video-container"><iframe src="https://www.youtube.com/embed/" frameborder="0" allowfullscreen></div>
Dynamic Shortcode to display the featured image into the template or into the listing
False
Dynamic Shortcode to display the featured image alt text
False
Dynamic Shortcode to display a list of 3 posts that have a specific taxonomy assigned (use in a Power Shortcode). Replace “tool” with your CPT and the @taxonomy and the terms with the taxonomy and the term you want to target.
{identity:{loop:
[<a href="https://gutenberg.wproads.com/resource/dynamic-shortcodes-listing-tutorial-resources/">Dynamic Shortcodes Listing Tutorial Resources</a>]
@sep=', '
}
}
Dynamic Shortcode to display taxonomies terms into your templates or listings, excluding specific terms if needed (use in a Power Shortcode). Replace the @taxonomy slug and the terms with the taxonomy and the term you want to target.
.yt-video-container {
position: relative;
width: 100%;
padding-bottom: 56.25%; /* 16:9 aspect ratio (9/16 = 0.5625) */
height: 0;
overflow: hidden;
}
.yt-video-container iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}