Title: Using shortcode with WP Bakery (Visual Composer) grid builder
Last modified: November 26, 2018

---

# Using shortcode with WP Bakery (Visual Composer) grid builder

 *  [adijeff](https://wordpress.org/support/users/adijeff/)
 * (@adijeff)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/using-shortcode-with-wp-bakery-visual-composer-grid-builder/)
 * Using the shortcode `[favorite_button post_id="{{ post_data:ID }}"]` within the
   grid builder I get the correct ID for the data attribute e.g. `data-postid="123"`
   but the data attribute for the favorite count is always `data-favoritecount="
   0"` instead of the correct number of favorites, and shows like this in the grid:
   `
   <span class="simplefavorite-button-count">0</span>` WP Bakery support pointed
   me to using a custom variable like [on this page](https://kb.wpbakery.com/docs/developers-how-tos/adding-custom-shortcode-to-grid-builder/#AddingCustomShortcodetoGridBuilder-Customtemplatevariable)
   but I still can’t get it to work for me.
 * Using the shortcode on a single page works fine.
 * Any help gratefully received, thanks.

The topic ‘Using shortcode with WP Bakery (Visual Composer) grid builder’ is closed
to new replies.

 * ![](https://ps.w.org/favorites/assets/icon-128x128.png?rev=1677726)
 * [Favorites](https://wordpress.org/plugins/favorites/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/favorites/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/favorites/)
 * [Active Topics](https://wordpress.org/support/plugin/favorites/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/favorites/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/favorites/reviews/)

## Tags

 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 0 replies
 * 1 participant
 * Last reply from: [adijeff](https://wordpress.org/support/users/adijeff/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/using-shortcode-with-wp-bakery-visual-composer-grid-builder/)
 * Status: not resolved