Title: Inconsistent shortcode evaluation in template
Last modified: September 13, 2024

---

# Inconsistent shortcode evaluation in template

 *  Resolved [nonbin](https://wordpress.org/support/users/nonbin/)
 * (@nonbin)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/inconsistent-shortcode-evaluation-in-template/)
 * The following show inconsistent behavior related to shortcodes in templates. 
   I have JCI set to execute shortcodes then twig, and line 3 outputs the the **
   result** of the shortcode like I expect, but line 2 returns the length of the**
   shortcode itself**
 *     ```wp-block-code
       {% set tmp = '[jsoncontentimporterpro nameoftemplate="trendData"]' %}trendData Length: {{ tmp | length }}</br> {# Returns 51, which is the exact length of the shortcode itself. should be closer to 500 #}{{tmp}}</br> {# Correctly displays the output of the shortcode #}
       ```
   
    -  This topic was modified 1 year, 8 months ago by [nonbin](https://wordpress.org/support/users/nonbin/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [berkux](https://wordpress.org/support/users/berkux/)
 * (@berkux)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/inconsistent-shortcode-evaluation-in-template/#post-18013058)
 * Hi,
   questions to the JCI PRO at [https://jsoncontentimporter.freshdesk.com/widgets/feedback_widget/new?searchArea=no](https://jsoncontentimporter.freshdesk.com/widgets/feedback_widget/new?searchArea=no)
   Here only about the free JCI, please.Thanks,Bernhard
    -  This reply was modified 1 year, 8 months ago by [berkux](https://wordpress.org/support/users/berkux/).

Viewing 1 replies (of 1 total)

The topic ‘Inconsistent shortcode evaluation in template’ is closed to new replies.

 * ![](https://ps.w.org/json-content-importer/assets/icon-256x256.png?rev=3464653)
 * [Get Use APIs - JSON Content Importer](https://wordpress.org/plugins/json-content-importer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/json-content-importer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/json-content-importer/)
 * [Active Topics](https://wordpress.org/support/plugin/json-content-importer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/json-content-importer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/json-content-importer/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [berkux](https://wordpress.org/support/users/berkux/)
 * Last activity: [1 year, 8 months ago](https://wordpress.org/support/topic/inconsistent-shortcode-evaluation-in-template/#post-18013058)
 * Status: resolved