I modified functions.php to add a list of taged news by using a shortcode. The Shortcode is pulled from a CPT-field.
If I add this:
echo apply_filters('the_content', get_post_meta($post->ID, 'news_shortcode', true));
my <div> inside the content gets filtered?
//check if the portfolio item was requested by an ajax call and returns that
if(!function_exists('avia_check_ajax_request')){
add_action('wp_ajax_avia_check_portfolio', 'avia_check_ajax_request');
add_action('wp_ajax_nopriv_avia_check_portfolio', 'avia_check_ajax_request');
function avia_check_ajax_request()
{
if(!isset($_POST['avia_ajax_request'])) return false;
global $avia_config, $more;
$avia_config['avia_is_overview'] = false;
$avia_config['is_ajax_request'] = true;
$id = $_POST['avia_ajax_request'];
global $post;
$post = get_post( $id );
setup_postdata($post);
$more = 0;
$slider = new avia_slideshow($id);
$slider -> setImageSize('fullsize');
$slider_html = $slider->display();
echo "<div class='ajax_slide ajax_slide_".$id."' data-slide-id='".$id."' >";
echo "<div class='inner_slide'>";
echo "<div class='flex_column two_third first'>";
echo $slider_html;
echo "</div>";
echo "<div class='portfolio-entry one_third'>";
echo avia_title(array('class'=>'portfolio-title', 'html' => "<div class='{class} title_container'><h1 class='main-title'>{title}</h1></div>"), $id);
$meta = avia_portfolio_meta($id);
if($meta)
{
echo $meta;
echo avia_advanced_hr(false, 'hr_small');
}
// mg test
echo apply_filters('the_content', get_post_meta($post->ID, 'news_shortcode', true));
echo "</div>";
echo "</div>";
echo "<div class='entry-content'>";
the_content(__('Read more','avia_framework').'<span class="more-link-arrow"> →</span>');
echo "</div>";
echo "</div>";
echo "</div>";
unset($avia_config['is_ajax_request']);
die();
}
}














