I often grab a page’s content and insert that content into an existing page (think of it as rendering a subpage within a parent page). When I do this with a page built by VC, things get tweaked.

I do $vc->addShortcodesCustomCss($post->ID) to get post-specific styles and then do apply_filters(“the_content”, $post->post_content) to get the content. The post-specific styling comes through fine. However, my rows don’t get the content padding applied to them (e.g. style=”position: relative; left: -367px; box-sizing: border-box; width: 1904px; padding-left: 367px; padding-right: 367px;”) and I fear I’m missing some JS that is called after a page gets loaded to apply that inline styling. Anyone done this kind of thing before? Any idea what I might be missing?

if (!empty($posts)) {
    $vc = new Vc_Base();
    echo "<div quad='$quadid' class='quadcontent'>";
    echo apply_filters("the_content", $posts[0]->post_content);
    echo "</div>";

Read more here: How can I Load Visual Composer Content using apply_filters("the_content", $c)


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: