WordPress.org

Forums

Edit Flow
[resolved] Hiding or Excluding a Particular Category from Story Budget or Calendar (5 posts)

  1. Dia Ritoch
    Member
    Posted 4 years ago #

    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!

  2. Scott Bressler
    Member
    Plugin Author

    Posted 4 years ago #

    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

  3. Dia Ritoch
    Member
    Posted 4 years ago #

    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!

  4. Scott Bressler
    Member
    Plugin Author

    Posted 4 years ago #

    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

  5. Dia Ritoch
    Member
    Posted 4 years ago #

    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!!!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Edit Flow
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags