Just give the item a css class like megamenu-template-1 and add this to the functions.php…
Total Theme ReplaCE VariabLES
/**
* Add Custom Dynamic Variables.
*
* @link https://total.wpexplorer.com/docs/snippets/add-custom-dynamic-variables/
* @since 5.6.1
*/
add_filter( 'totaltheme/replace_vars/vars', function( $vars ) {
// Check if the post has a featured image
if (has_post_thumbnail(get_the_ID())) {
$class = 'xxx'.get_the_ID(); // Return an empty string if no featured image is set
} else {
$class = 'hidden'; // Return an empty string if no featured image is set
}
$vars['featured_cond'] = $class;
return $vars;
} );
