Feature Suggestion
-
Hi Johan,
Excellent plugin!I have a feature suggestion – check for a matching template part in the theme folder before outputting/displaying the content block.
For example with the code below, if a user had a content block with the title About Us,
they could also have a template part called block-aboutus.php in their theme folder that would handle the output:Add to post-widget.php, line 83
// Look for template before default output
$title = str_replace(array(' ','_','-'), '', strtolower($content_post->post_title) );
if (locate_template("block-{$title}.php")) {
echo get_template_part('block', $title);
return;
}
This will allow the plugin to work really well with something like Advanced Custom Fields – You can effectively have Advanced Custom Fields (ACF) for Sidebar Widgets when used in conjunction with your plugin. Let me know your thoughts! I want to actually write a tutorial on my blog bcooling.com.au/blog about using ACF + Custom Post Widget for this purpose.
https://www.ads-software.com/extend/plugins/custom-post-widget/
- The topic ‘Feature Suggestion’ is closed to new replies.