Support » Plugin: WP RSS Aggregator » Turning off frontend actions and filter

  • Resolved ChiefAlchemist


    Nice plugin. Thanks for sharing.

    I’ve hacked together my own (experimental) feed to post. Included in my work is a taxonomy (e.g., feed_source). I want to use the taxonomy on the front end to filter posts by it – just like categories an tags.

    Well, on the frontend categories and tags work just fine but when I try to view/filter by the feed_source taxonomy (e.g., I get “No feed items found.” I’ve tracked that down to feed-display.php: line 363. I know the problem is WP RSS Agg because when I disable the plugin the query (for the custom taxonomy) works just fine. Yes, I’ve resaved permalinks πŸ™‚

    Where is WP RSS Aggregator “cutting in” on a custom taxonomy query? why is this? How can I stop this?

    I’ve been poking around in the code trying to resolve this myself, but that’s not moving me fast enough. As you could guess, the client wants this done yesterday. I thought i was done, sans a couple quick changes to the theme and then this happened.

    Thanks in advance for your help.

Viewing 14 replies - 1 through 14 (of 14 total)
  • Ok. I’ve made some progress. I think πŸ™‚

    I found this:

    function wprss_get_feed_items_query( $settings )

    and in that function this:

    $feed_items_args = apply_filters( ‘wprss_display_feed_items_query’, $feed_items_args, $settings );

    Yes. I get it. I can use that filter. But I really don’t want it, or need it. I just want plain ol’ regular WP on the frontend. I don’t wanna have to worry about what WP RSS Agg might or might not be doing. Ya dig?

    Where is the bottleneck? Where can I cut off WP RSS Agg from effecting the frontend?

    Again, thank you.

    On last thing. I just noticed this:

    $wp_query = $feed_items;

    Um. Well. I’m not so sure completely smashing the default $wp_query object is a best practice. I would think such things have the potential effects that could cascade across other plugins, etc. in more or less unpredictable ways.

    Something is definitely odd here as even changing the post_type didn’t do it.

    Hi @chiefalchemist,

    Sorry for the delayed response.

    Thank you for your long explanation, but unfortunately, we’re afraid we still don’t get what your initial problem was.

    You were asking,

    Where is WP RSS Aggregator β€œcutting in” on a custom taxonomy query? why is this? How can I stop this?

    But we’re also not sure how to respond that. As far as we know, the Core plugin does not use any custom taxonomy within it. The custom taxonomy added when you use the Categories add-on.

    Or perhaps that was the one you are using and asking about? If so, or if you use any of our premium add-ons, please open a premium support ticket.

    We’ll try our best to help you in any way we can there.

    Hi Eric –

    Thanks for getting back to me. Maybe this will help. It’s my first full paragraph above:

    “I’ve hacked together my own (experimental) feed to post. Included in my work is a taxonomy (e.g., feed_source). I want to use the taxonomy on the front end to filter posts by it – just like categories an tags.”

    Maybe re-read the whole thing from the top since that’s probably The Key bit you need to know as you read down πŸ™

    In short, I added a taxonomy. I can use it admin side. However, when I try to use it on the front end it doesn’t work. Somewhere WP RSS Aggregator is highjacking WP Query and forcing it to look at either the wprss_feed or wprss_feed_item (I forget which) post_type.

    I’ve looked at the filter – that I could find – and tried a number of difference things. But I get the same result. What I want is simple…to stop WP RSS Agg from affecting the frontend.

    Just so I’m clear I want to add / repeat: If I disable WP RSS Agg then WP works just fine. That is, the taxonomy works on the frontend just as I would expect it to. However, once I reactive WP RSS Agg that taxonomy on the frontend goes wonky.

    This doesn’t sound like a big deal to me. But then again, if it were easy and obvious I wouldn’t be here asking for insight πŸ˜‰

    Thanks in advance.

    p.s. I don’t want to get off topic but…

    $wp_query = $feed_items;

    Is not a best practice really. Perhaps this is why WP is getting confused?

    Hi ChiefAlchemist,

    Thank you for elaborating on that.

    Since it would seem that you are doing your own customization, we’re afraid we couldn’t help you much with this.

    That being said, WP RSS Aggregator does the work mostly on the “admin side” since its main job is to import the feed items from RSS Feeds.

    The only part WP RSS Aggregator works on the “front end side” is when it displays the feed items from the shortcodes.

    Do you still use the shortcode to display your feed items by any chance? Or do you use custom WP_Query for that?

    If you’re using a custom WP_Query, then there shouldn’t be any problem since WP RSS Aggregator won’t be able to affect that.

    But if you do using the shortcode, then perhaps you can use the filter below:

    remove_action( 'wprss_display_template', 'wprss_default_display_template', 10, 3 );

    then add your own function/template to display the feed items.

    Alternatively, you can also use the feed_output filter as suggested in our documentation here.

    By using one of the filters above, we believe WP RSS Aggregator shouldn’t affect the way to display the feed items in the front end again (if again, you are using the shortcode).

    Please let us know if this works for you.

    With regards to your other question about putting the:
    $wp_query = $feed_items;

    Did you mean the one in the includes/feed-display.php file on line 329?

    Thanks Eric –

    Yup. To be clear, I’m not asking for help. I know what I’m doing πŸ˜‰ Most of the time. LOL

    That said, your plugin does something things that for all practical purposes are “unorthodox.” I spent a fair amount of time looking for an obvious way to unscramble those eggs. But to no avail. So I had no choice but to ask.

    Thank! You!! For your assistance.


    p.s. I’d like to suggest y’all add the feed obj or feed id to the filter: wprss_populate_post_data.

    For example, I was able to use your wprss_fields filter to add a field to the feed settings. That happened to be a checkbox for “auto-publish” (as I had changed the default to draft). When I used wprss_populate_post_data I had to “pre-process” the $item and add the feed_id to that obj.

    It works, but it’s a bit awkward. I try to avoid mucking with objects I don’t really have control over. I would have preferred to just get the feed obj / feed_id for the $item passed into the filter. Kinda like “this is everything you need to know, dowotchalike.”

    Know what I mean? πŸ™‚

    Thanks again. I’m gonna presume the remove_action() is gonna do the trick. I hope πŸ™‚

    Oops? I don’t think that’s working.

    I think that action is coming too late. The WP Query is already being mucked up. Best I can tell your plugin is doing something somewhere further upstream to the query object, such that it’s effecting any new / custom taxonomies.

    Important! >> This doesn’t really have anything to do with my customer extension, AFAICT.

    I mean, this is just a taxonomy on the post_type: post. When I add that tax to the frontend (theme) and click the term on a given post, I don’t get the archive template.


    feed-source is the tax, wp-beginner is the term. That doesn’t work when WP RSS Agg is activated. I get something else. I presume it’s WP RSS Agg’s since it’s not mine πŸ˜‰

    What’s odd is Categories and Tags continue to work as expected. Whatever WP RSS Agg is doing, it seems to ignore those cases.

    FYI – I’m using Twenty Fifteen.

    I’d like to suggest you add a taxonomy to your local dev’s post_type = post. Add a couple terms for a couple posts. Then use get_the_term_list() to display those on the frontend. In Twenty Fifteen I modified content.php

    Then you’ll be doing what I’m doing, and getting what I’m not getting.

    Again, just to be 100% clear, I have completely deactivated my plugin that’s an extension to your plugin. All I have now is code to add the taxonomy to post_type = post. That should work just like Cats and Tags. It doesn’t

    tia –

    In case you’re wondering, we’re trying to built our own custom RSS reader. We’re wanting to use your WP RSS Agg to import the feeds**. And that’s it. But your plugin is mucking with the frontend as well, and we’re just looking for a way to turn that off. We don’t need shortcodes, etc.

    ** Yes, we also want to add some magic to the importing process. That’s all fine. That’s not the issue here. The issus is WP RSS Agg doing something to the frontend queries and making our custom taxonomy not work as it should (and Cats and Tags do).

    thanks again. I hope you have all the details you need. If not, please let me know.

    Hey Eric –

    I presume you’re still researching / resolving this. Thanks! πŸ™‚

    I just wanted to let you know that in your file feed-importing.php on ~ line561 my IDE is showing the var $source as undefined. you, it’s within the else {} that’s rare to happen but I figured you’d want to know.

    tia –

    Hi MFS,

    I have passed your issue here to our developers and here’s what they have to say:

    We couldn’t see anything right off the bat that would modify the global WP_Query object on pages that are not displaying WP RSS Aggregator items.

    This is similar to what I have tried to tell you before.

    But since there could be any misunderstanding between us, could you please do us a favor by sending us your code and instructions to reproduce your issue? Just to make sure we’ll be able to reproduce and see the same issue you are facing.

    Our developers will then look at it again.

    With regards to your latter question, thank you for your feedback. Is this related to your current issue here, by any chance? If it isn’t, and if you’d like to, can you please open a new thread for that?

    Just to make sure we don’t confuse ourselves with the various topics we’d like to discuss here.

    Thanks again!

    “I’d like to suggest you add a taxonomy to your local dev’s post_type = post. Add a couple terms for a couple posts. Then use get_the_term_list() to display those on the frontend. In Twenty Fifteen I modified content.php”

    That is all I did. I added a custom tax ( and then I used get_the_term_list() in the Twenty Fifteen theme. That’s it. No “code”. This isn’t about my add-on. I “removed” that for this debugging.

    On the frontend, when I try to query / filter by that taxonomy *with WP RSS Agg* active, it doesn’t work. Categories are fine. Tags are fine. But for my tax WP RSS Agg is hijacking the query.

    p.s. Not that issue with your code is not related. It was simply a courtesy. I’m too busy to open another ticket, sorry. This issue we’re on is already a lot of repeating what I’ve already shared w/ you. Thanks? πŸ™

    If I disable WP RSS Agg the taxonomy / term query (via get_the_term_list()) works. That is, EVERYTHING (read: my new tax + theme mod) is the same. The only thing I’m chaging is your plugin being active or not.

    Bump. What’s the status of this?


    FYI – I think this has been resolved. I started with a fresh WP install + WP RSS Agg and it seems okay now.

    BTW, I noticed this ticket had to do the same. Not that two is a pattern but it certainly sounds like you might have a problem under the hood somewhere.

    Hi ChiefAlchemist,

    We’re really sorry but due to a high load of support lately (as can be seen in the top notice of our Support page), we have only now been able to continue investigating your issue.

    With regards to your issue, our developers have tried to test this issue by using this following code: that can be included in an includes directory beneath the directory of an active theme and can be called in the theme’s functions.php using the following code:

    if (true) {
        // assuming the php file name is 'org-topic-turning-off-frontend-actions-and-filter.php'
        require_once(dirname(__FILE__) . '/includes/org-topic-turning-off-frontend-actions-and-filter.php');

    However, we still can’t reproduce the issue.

    That being said, since you can have this issue is resolved, we’re glad to hear that.

    Lastly, the other thread you pointed out could be or couldn’t be have the similar issue as yours. Moreover, if by doing a fresh install (both WordPress site and/or the plugin) can clear up the problem (both yours and that other thread’s problem), we’re not sure if the issues are really coming from the plugin. It could be that the issues are actually coming from other part of the site that causing conflict with ours.

    However, if you can point out that the issues are really from the plugin, we’d be gladly to hear that and fix it where necessary.

    Thanks again for all of your feedback.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Turning off frontend actions and filter’ is closed to new replies.