I made a shortcode which I put in the popup. The shortcode just needs to get the content of the page by ID I created in Elementor and show it in a popup with the same design as it is on the inner page.

$content_post = get_post(1000);
return do_shortcode( apply_filters( 'the_content', $content_post->post_content ) );

Using this code, the current page is loaded into the popup, not with ID 1000 with markup and styles.

If I use code without a filter:

return do_shortcode( $content_post->post_content );

I am getting content from the page I want, but it is without design from html markup.

Why is this so? How do I load the page I want into the popup with all the markup and styles I have configured in Elementor?

1 Answer 1


Unfortunately, I was too hasty with the question. Luckily I found the answer to my question here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.