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 fine
This is an Elementor page.
Can you help me with this?
I tried directly creating a php ESI blockadd_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’);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?
The topic ‘ESI Shortcode doesnt work with Elementor’ is closed to new replies.