While customizing LearnDash I came across an issue in the topic.php file where the $lesson_post variable was returning null even when there was a parent lesson for the topic.
So, after digging around at the LearnDash source code a bit I came up with this simple solution to grab the lesson whenever I needed using the topic post which is accessible via $post.
Not sure if others will find this helpful, but there are not a ton of extensive docs or articles on developing for LearnDash so wanted to share 🙂
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"]'); ?>
Swift templates is a way to use a simple templating language to create custom templates from within the admin area, and even the Publish page. I suppose for the right client and use case it would be helpful, but for the type of work I do creating simple sites for clients, it doesn’t really apply.
That said, I’m curious to see how it evolves and if anyone has experience using it. You can read more about the feature here or check out the WordPress Creation Kit, which it is a part of.
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.
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.
If you’re building an admin settings page for a plugin, you should check out this plugin to get easy, copy and paste code to create all the WordPress default layouts and markup.
Thanks Frank for making it so easy!
Looking forward to implementing some of these tips in my next plugin project! Thanks Remi 🙂
Link: Plugin Templating within WordPress