podlove-publisher icon indicating copy to clipboard operation
podlove-publisher copied to clipboard

Podlove manipulates Query in Widget

Open Soean opened this issue 6 years ago • 5 comments

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

Soean avatar Nov 29 '18 12:11 Soean

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.

eteubert avatar Nov 29 '18 15:11 eteubert

Thanks for the feedback and workaround. I don't really understand what this function is doing, why do we need it?

Soean avatar Nov 29 '18 15:11 Soean

Edit: Maybe we should use $post_type = $query->get( 'post_type' ); instead of $post_type = get_query_var( 'post_type' );?

Soean avatar Nov 29 '18 15:11 Soean

@Soean Better late than never? Yes your suggestion was good, it's released now and that probably makes the constant above unnecessary.

eteubert avatar Sep 06 '19 09:09 eteubert

Thanks!

Soean avatar Sep 06 '19 10:09 Soean