I have just spent the better part of this afternoon doing exactly this. My ‘sizes’ are in g, kg, etc and needed the exact same thing.
There are two ways you can do this.
1. Edit wp-content/plugins/recipe-press/includes/template_tags.php.
Find the line with “/* Convert size to plural if more than one */” (approx line 366) and comment out the if statement (5 lines worth). This will make the size display as you have entered it in the size settings. Only down side to this, it will not then ‘fix’ pluralisation when size is something like “cup”.
2. Edit /wp-content/plugins/recipe-press/includes/inflector.php
Add the terms you do not want to be pluralised into the array generated by “static function cacheUncountable()”. You can also use the static function cacheIrregular() in a similar way.
Option 2 means that you can still have pluralisation being used, but only on items that then make sense.
Hope this helps. I know my recipes now make more sense.
Cheers,
Trav
Thread Starter
ashchi
(@ashchi)
Hi Trav,
And, a very big thank for you for solving this for me. I followed your 1st direction and now am happy to say that every thing works as I wanted.
Regards
Remember that doing either option will get overwritten when the plugin is upgraded.
Thread Starter
ashchi
(@ashchi)
Hi curtismchale,
Will remember if new version is out.
Regards
Yeah, I should be more diligent when writing my instructions – I tend to assume that if you want to hake code you would know that it gets overwritten when you upgrade plugins, themes, etc.
I keep a top level folder outside public_html with copie of modified files (as my own backup) and also a “mods_log” text file which pretty much has instructions on what to look for for my changes and the actual change matching the version of plugin/theme…but that’s the Architect/Engineer in me taking control of me 😉
Good luck all, and hopefully the great support for this wonderful app will continue after grandslambert moves on…
Trav
We’ve added a setting for enabling/disabling pluralization and singularization of ingredients and serving sizes. It will be included in the next update (coming soon), but for now you can get it by checking out the plugin from SVN here:
http://code.google.com/p/recipe-press/source/checkout
Devin