[resolved] Postie: category filter (3 posts)

  1. merlinox
    Posted 5 years ago #

    I have a plugin that bind user to category (bind user to category). I'd like to integrate it, with postie filter.

    So I made some test and I create a filter to insert received post into a category. This is my test function:
    function auto_category($post){
    $cat = {'RugbyCS Test'};
    $post['post_category'] = $cat;
    return ($post);
    add_filter('postie_post', 'auto_category');

    But after fetching email, that existing category is not set.
    I tried also with the category_id (instead of category string) but it doesn't work.

    May you help me please?

  2. merlinox
    Posted 5 years ago #

    I tried also:

    • $cat = {'RugbyCS Test'};
      $post['post_category'] = $cat;
    • $cat = 'RugbyCS Test';
      $post['post_category'] = $cat;
    • $cat = {304};
      $post['post_category'] = $cat;
    • $cat = 304;
      $post['post_category'] = $cat;

    With no good results.

  3. merlinox
    Posted 5 years ago #

    SORRY for these thread. I had filterPostie.php deactivated: I didn't know it is a plugin standalone. Now it works. 'post_category' must be an int array with category_ids.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Postie
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic