Custom fields
-
While it hasn’t been updated in a while and isn’t actively maintained, it seems a lot better than the alternatives I’ve tried like Shortcoder.
Unfortunately unlike Shortcoder, Buckets doesn’t have support for custom variables.
I added the following two lines to the
buckets_shortcode
function inbuckets.php
to add support for custom variables (line 343):foreach ($arg as $key => $value) $return = str_replace("%%$key%%", $value, $return);
This allows shortcodes to be called like
[bucket id="1234" title="My Bucket" myvar="myvalue"]
. Inside buckets you can use%%myvar%%
to access the custom variable.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Custom fields’ is closed to new replies.