I recently came across a great shortcode that I wanted to embed directly into a template, rather than use as a shortcode from within the admin area. If you ever need to do this you can use the do_shortcode function, and pass any necessary parameters as you would need. <?php echo do_shortcode('[shortcode with="parameters"]'); ?>
Tag: template files
If You Don’t Know the Difference Between font-page.php and home.php Here’s What’ Up
This is something that came up as an issue during my How to Build a WordPress Theme project for Treehouse. I found Chip Bennet had a pretty good explanation on his blog.
Create a Custom Archives Page Like WP Beginner
WP Beginner recently published a tutorial showing how to create a custom archives page. I really support the idea of breaking the mold from traditional WordPress archive page layouts.
How to Get Post Type within WordPress Loop
There are some times when you want to test for the post type of an item in your loop. You may use this in your functions.php file for taking dynamic actions for custom post types, or you may need to use it directly in your template. Either way, here is how you would save the … Continue reading How to Get Post Type within WordPress Loop