podlove-publisher
podlove-publisher copied to clipboard
Podlove manipulates Query in Widget
We use a widget on a category page in a sidebar to display a list of posts. I found this function is manipulating our query and all post types are listed in the widget. https://github.com/podlove/podlove-publisher/blob/master/lib/podcast_post_type.php#L111
System information
Podlove Version 2.7.17
It's not a great solution but I'm not sure how to fix it for you without breaking it for others otherwise. Also, this piece of code is 6 years old and you are the first one to stumble over this, so I'd say a workaround rather than a fix is acceptable.
Here's what you do, put this constant definition in your wp-config.php
above /* That's all, stop editing! Happy blogging. */
:
define('PODLOVE_DISABLE_TAG_AND_CATEGORY_SEARCH', true);
This will work starting from the next release.
Thanks for the feedback and workaround. I don't really understand what this function is doing, why do we need it?
Edit:
Maybe we should use $post_type = $query->get( 'post_type' );
instead of $post_type = get_query_var( 'post_type' );
?
@Soean Better late than never? Yes your suggestion was good, it's released now and that probably makes the constant above unnecessary.
Thanks!