I just bought the Visual Composer plugin from wpbakery, my problem is that I'm making ajax calls to get the content of posts that have been edited with Visual Composer when I get the data it only show me the shortcodes of the plugin
As I see from the information that I have found on how to fix this problem is that ajax calls can't show shortcodes because of the admin ajax url that they dont have full access to wordpress enviornment but I want to know if someone has done it please it would help me a lot
basically this is how I print it, the ajax call is working fine it shows me what I saved but the elements doesnt show correctly it only shows shortcodes
this code is in a plugin I made
function prefix_load_proyect () {
$post_id = $_POST[ 'proyect' ];
$the_query = new WP_Query(array('p'=>$post_id, 'post_type' => 'home_portfolio'));
while ( $the_query->have_posts() ) : $the_query->the_post();
$content = apply_filters('the_content', $post->post_content);
$content = do_shortcode(get_post_field('post_content', $postid));
$html=$content;
endwhile;
wp_reset_postdata();
echo $html;
die();
}
then in the js file I just make the ajax call and put the html response with jquery into a container
jQuery.ajax({
type: 'POST',
url: ajaxurl,
data: {"action": "load-filter-proyect", proyect: proyectID },
success: function(response) {
jQuery('#agregarProyectContainer').html(response);
});