WordPress Shortcode – Compare Values


With both Profile Builder and WordPress Creation Kit plugins using Mustache as their template system for things like User Listing and Swift Templates, we need at times the possibility to compares different values.

This however, is not possible in Mustache. So a shortcode to compare values comes to the rescue.

Compare Shortcode

Download Compare Shortcode

How to use


Code wise, it’s fairly straight forward. You can also see what operators are supported:Array

Subscribe to get early access

to new plugins, discounts and brief updates about what's new with Cozmoslabs!

3 thoughts on “WordPress Shortcode – Compare Values

  1. A great addition to WCK. I would love to see AND / OR added to the capability, so

    [compare val1=”{{abc}}” val2=”” operator=”!=” AND val1=”{{def}} val2=”” operator=”!=”]

    Also, is nesting supported? I can’t see any reason why not but in my (limited) testing it didn’t seem to.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.