Title: Custom fields
Last modified: August 24, 2016

---

# Custom fields

 *  Resolved [summatix](https://wordpress.org/support/users/summatix/)
 * (@summatix)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/custom-fields-162/)
 * 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 in `buckets.
   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.
 * [https://wordpress.org/plugins/buckets/](https://wordpress.org/plugins/buckets/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [matthewordie](https://wordpress.org/support/users/matthewordie/)
 * (@matthewordie)
 * [11 years ago](https://wordpress.org/support/topic/custom-fields-162/#post-6000587)
 * Great suggestion, I updated buckets to include this in 0.3.3 and credited you
   in the change log! Thanks alot!

Viewing 1 replies (of 1 total)

The topic ‘Custom fields’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/buckets.svg)
 * [Buckets](https://wordpress.org/plugins/buckets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/buckets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/buckets/)
 * [Active Topics](https://wordpress.org/support/plugin/buckets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/buckets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/buckets/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [matthewordie](https://wordpress.org/support/users/matthewordie/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/custom-fields-162/#post-6000587)
 * Status: resolved