Is this the best method of writing this?

This topic is: resolved


Viewing 4 posts - 1 through 4 (of 4 total)
Author Posts
May 29, 2013 at 10:09 am #3108
Bart Dabek
Post count: 24

Just want to make sure there is no better way… I’m finding it hard to explore the framework in terms of best practices… is there no way to search through all the methods on the site?

anyway here is the line

foreach ($wf->type($type)->posts(“posts_per_page=3&orderby=meta_value_num&meta_key=post_views_count&order=desc”) as $item) :


May 30, 2013 at 10:28 am #3140
Post count: 207

Hey Bart,

There are multiple ways to do it really, but a slightly more concise way you can run that query is like so:

Sorry about the documentation searching. Will add some kind of search to it soon, on top of the many other things to be done. It has been quite the challenge (and time sink) to build documentation for a framework as vast as this one.

May 31, 2013 at 3:54 am #3143
Bart Dabek
Post count: 24

Thanks 🙂 It’s really quite a joy to use… just need to ramp up on how everything gets done… code looks much cleaner… one thing that does concern me is how will others find using it… it takes quite a bit of ramp to get used to it from the WP ways

May 31, 2013 at 10:27 am #3147
Post count: 207

Thanks Bart. I totally agree, it is a very different way of building the code. Good to see you’re giving it a good shot as well. I like to think of it as being similar to the way jQuery enhances JavaScript – it had a reasonable learning curve too, but once you get used to it, you can do a lot without needing to lookup documentation all the time.

I think it’s an interesting API though, and always good to have more options. And it is interesting to hear your thoughts about learning curve – it’s hard for me to empathise with that, having built the thing 🙂

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Latest From the Blog

MasterPress 1.4.1 is now available

27th May 2024

This update addresses backwards compatibility issues that were introduced in the previous update. There were some edge cases where PHP 7 had issues and it didn’t work at all on PHP 5.6. We have now changed it so that the PHP 8 compatibility changes will now only affect PHP 8 and will be more thorough… 

Plugin Requirements

MasterPress requires a minimum of WordPress version 4.9, MySQL 5.6, and PHP version 5.6.20.

We also recommend that PHP is configured to use a memory limit of 64MB per request (128MB may be required for sites with higher complexity).

This plug-in is not compatible with the hosted service.

Three AM