Code Sample: Changing the number of posts on the Story Budget

We received a question from Quint Randle about how to customize the number of posts displayed in the Story Budget view of Edit Flow (which is 10 by default), so I thought I’d write up a quick tutorial here. It’s simple, and enabled in Edit Flow by this bit of code.

To increase (or decrease) the number of posts from the default of 10, just add a small code snippet to the functions.php file in your theme. For instance, the following would increase the number of stories shown per category to 20:

add_filter( 'ef_story_budget_query_limit', create_function( '', 'return 20;' ) );

Just modify the ’20’ above to whatever number of posts you’d like to see in the Story Budget view. And voilà!

Of course you could split out the create_function call above to actually use a function that you’ve defined elsewhere in your functions.php file, but unless you’re going to have complicated logic to decide how many posts to display, I don’t see the need for anything beyond that one-liner.

Any further tutorials you would like to see on our blog here? There are lots and lots of filters baked into Edit Flow that are just dying to be unlocked by you, our users—let us know in the comments below what you’d like to customize or see in action and we’ll do our best to explain how to use it! And as always, for support questions, please post your question here.

Looking for your input: our first Edit Flow survey

As we start putting the finishing touches on v0.6, we’ve realized that we want to hear more from our users. Please fill out the survey at the below link so we can better shape Edit Flow’s future toward your needs. Thanks in advance!

Take our survey here