admin管理员组

文章数量:1289542

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?

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?

Share Improve this question edited Aug 4, 2021 at 7:01 VladSiy asked Aug 4, 2021 at 6:23 VladSiyVladSiy 57 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

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

本文标签: phpWhy is the current page loaded in the popup window and not the specified one