Hi, I have another issue.
I created shortcode in functions.php:
add_shortcode(‘wpb_childpages’, ‘wpb_list_child_pages’);
Inside functions.php I have a function wpb_list_child_pages($atts) { } which basically checks for specific post types and shows the content. It echoes something like this (short version):
<div class="sometable>
<div class="item">
1st post title
</div>
<div class="item">
2nd post title
</div>
<div class="item">
3rd post title
</div>
</div>
I’m using the shortcode inside the content area inside the col inside the row inside the section in the Cornerstone page editing (using [wpb_childpages]).
The shortcode works because I get the content. The issue is that when I’m editing the page I get the content shown inside the container in the right place (it’s like 3rd in a row, so I get the content nicely in the middle of the page). But when I go to see the page preview, all the content form this container starts showing in the browser top left corner.
I’m not using any special CSS (like absolute position or anything similar), so it’s really annoying. Anyone with any idea? Thanks
Edit: to be accurate, the shortcoded content (whole div element) is seen in the top of the browser, but the element gets inserted right after div element with entry-content content class (it’s the div with ID parent-275 which should be nested quite lower in the code):