Title: ESI Shortcode doesnt work with Elementor
Last modified: February 9, 2024

---

# ESI Shortcode doesnt work with Elementor

 *  Resolved [salmancrusher](https://wordpress.org/support/users/salmancrusher/)
 * (@salmancrusher)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/esi-shortcode-doesnt-work-with-elementor/)
 * Hello, I have a simple shortcode
 * function cp_get_most_read(){
   $cp_most_read = get_option(‘cp_most_read_items_html’);
   return $cp_most_read;}
 * add_shortcode(‘cp_get_most_read’,’cp_get_most_read’);
   When I use[esi cp_get_most_read
   ttl=”7200″]No output, the shortcode is printed “as-is”[cp_get_most_read]works
   fineThis is an Elementor page.Can you help me with this?I tried directly creating
   a php ESI block
 * add_action( ‘litespeed_esi_load-display_most_read’, ‘most_read_block_content’);
 * function most_read_block_content()
   {$cp_most_read = get_option(‘cp_most_read_items_html’);
 *     ```wp-block-code
       do_action( 'litespeed_control_force_public', 'a custom note to shown in debug log' );
       do_action( 'litespeed_control_set_ttl', '300' );
         return $cp_most_read;    
       ```
   
 * }
   add_shortcode(‘most_read_block_content’,’most_read_block_content’);but I dont
   think this works, because I am just returning the content, and not apply echo
   or rendering the content direclt on the template.Can you advise?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/esi-shortcode-doesnt-work-with-elementor/#post-17411964)
 * > No output, the shortcode is printed “as-is”
 * this typically happens when ESI is not enabled, please verify
 * and are you using OpenLiteSpeed ? or LiteSpeed Enterprise or something else ?
 *  Thread Starter [salmancrusher](https://wordpress.org/support/users/salmancrusher/)
 * (@salmancrusher)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/esi-shortcode-doesnt-work-with-elementor/#post-17412441)
 * i use litespeed WP plugin running on litespeed enterprise.
 * esi is enabled for sure, if you see my second block of code which uses ESI filter,
   then it renders correctly.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘ESI Shortcode doesnt work with Elementor’ is closed to new replies.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [salmancrusher](https://wordpress.org/support/users/salmancrusher/)
 * Last activity: [2 years, 3 months ago](https://wordpress.org/support/topic/esi-shortcode-doesnt-work-with-elementor/#post-17412441)
 * Status: resolved