Using shortcodes in Query Loop with Frontend Rendering On?

Hello all, I’m transition one of my project from Elementor + JetEngine to Cwicly, again!

This project is a bit complex, as previously I wrote a lot of different shortcode functions, and put them in my JetEngine Listing templates. These functions will grab the current post id and then generate it’s own data from its custom fields.

One of my example is:
add_shortcode( ‘news_polygon_image’, ‘render_news_image_shortcode’ );

function render_news_image_shortcode() {
    $new_image = get_post_meta( get_the_ID(), 'outsource-image', true );

    if ( empty( $new_image ) || !is_valid_image( $new_image ) ) {
        // Get the terms associated with the current post
        $terms = get_the_terms( get_the_ID(), 'breakoutz-topics' );
        
        // Set a default fallback image
        $fallback_image = 'example.com';
        
        // Check if the post has the 'reddit' term
        if ( has_term( 'reddit', 'breakoutz-topics' ) ) {
            $fallback_image = 'example.com';
        }
        
        // Check if the post has the 'twitter' term
        if ( has_term( 'twitter', 'breakoutz-topics' ) ) {
            $fallback_image = 'example.com';
        }
        
        // Use the fallback image based on the terms associated with the post
        $new_image = $fallback_image;
    }

	$html = '<img src="' . $new_image . '">';

    return $html;
}

As you can see, this code I have is grabbing current post id, and then grabbing the post’s custom field ‘outsource-image’, then gnerate it into html output. In this code I also looked into if current post has certain term, if so, then display different fallback images if images returning 200 error.

Now putting this shortcode into query builder is breaking the entire query loop, or just returns nothing.

I came across this post, tried to follow but nothing works.

Also I’m using a plugin called “Post Like Dislike”, and this plugin is given a shortcode where I normally put in my JetEngine listing and then it will display the Upvote button and function perfectly for each loop items. But not in Cwicly’s Query loop builder.

Another thing I’m encounter is that I can’t find a way to display ‘Comment Count’ for my query loop items, no options available and I normally will build a shortcode for it but in this case, the shortcode does not work in Query loop builder of Cwicly.

Some of my custom shortcodes are working when I turn off the Frontend Rendering from the Query builder, but I need it to be on because I will have a lot of filters to filter my queries later on.

Any idea or experience on how to bypass these issues? Calling out @Louis for more insight and help, appreciated!