Bug in Recent Recipes Widget – missing custom post_type
Not sure if this is the right place to post this, but I believe I’ve found a minor bug in the Recent Recipes Widget.
In my site, I’m using custom post types with Recipress so that I can have all my recipes on a separate page. I’ve then added the Recent Recipes widget to that page, but it is not showing up any recipes.
I’ve done a bit of digging and come to the conclusion that the reason for this is that the widget does not specify a post type in it’s WP_Query args, and hence the post_type defaults to post. The simple addition of a ‘post_type’ => recipress_post_type() into $args solves the problem.
The output from diff is shown below:
118a119 > 'post_type' => recipress_post_type(), 212c213 < ?> \ No newline at end of file --- > ?>
Hope you can add this into your next version.
- The topic ‘Bug in Recent Recipes Widget – missing custom post_type’ is closed to new replies.