New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Podlove manipulates Query in Widget #1017

Open
Soean opened this Issue Nov 29, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@Soean
Contributor

Soean commented Nov 29, 2018

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

@eteubert eteubert added the bug label Nov 29, 2018

eteubert added a commit that referenced this issue Nov 29, 2018

@eteubert

This comment has been minimized.

Member

eteubert commented Nov 29, 2018

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.

@Soean

This comment has been minimized.

Contributor

Soean commented Nov 29, 2018

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

@Soean

This comment has been minimized.

Contributor

Soean commented Nov 29, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment