WordPress.org

Support

Support » Plugins and Hacks » Edit Flow » [Resolved] [Plugin: Edit Flow] Hiding or Excluding a Particular Category from Story Budget or Calendar

[Resolved] [Plugin: Edit Flow] Hiding or Excluding a Particular Category from Story Budget or Calendar

  • Hi! I really like your plugin. I am actually using it coz I handle a bunch of freelance writers online. I would like to know if it’s possible to hide or exclude a particular category from showing up in the calendar and the story budget? I have a NEWS category and I really don’t want my writers to see it along with their submitted articles.

    Thanks and hoping to hear from you soon!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Scott Bressler

    @sbressler

    Hi Dia,

    There currently isn’t a way to do this. There will be a way to accomplish this filter in the story budget with the next release of Edit Flow, and we will try to find a solution for the calendar as well.

    To give a bit more back story, it should be possible in the story budget right now with the following bit of code (which you can put into your theme’s functions.php file):

    add_filter( 'ef_story_budget_filter_terms', 'my_ef_story_budget_remove_news_category' );
    function my_ef_story_budget_remove_news_category( $all_terms ) {
          $filtered_terms = array();
          $i = 0;
          foreach( $all_terms as $term ) {
                if ( $term->slug !== "news" ) {
                      $filtered_terms[$i++] = $term;
                }
          }
          return $filtered_terms;
    }

    However, you would need to make two tiny fixes to Edit Flow to get this to work (our own typos, sorry!). Both of these fixes are already slated for the next release of Edit Flow, but we’d be happy to share them with you now if you don’t mind diving into the plugin’s code a little bit. Let us know!

    Thanks,
    Scott

    Hi Scott!

    Thanks for the prompt response. As instructed, I put the code to my functions.php file. And yes, there wasn’t any changes.

    I really don’t mind tweaking the codes 🙂 Please instruct me further. I would really appreciate it.

    Thank you!

    Plugin Author Scott Bressler

    @sbressler

    Also make the changes you see here. Most importantly, the change of “$terms” to “$this->terms” as well as the name of the filter from “reorder” to “filter”. The deletion of the commented-out code is irrelevant.

    Thanks,
    Scott

    Hello Scott!

    Thank you! My Story budget no longer shows the menu for my News category! It worked! Thank you so much!

    Hope we can soon have a solution for the calendar issue in the next version.

    Again, thank you!!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] [Plugin: Edit Flow] Hiding or Excluding a Particular Category from Story Budget or Calendar’ is closed to new replies.
Skip to toolbar