1

Hey you have to use the below logic to handle the above conditions, it will work. if (!is_user_logged_in() && has_tag('private')) { ?> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"> <img src="<?php bloginfo('template_directory'); ?>/img/default-login.jpg" alt="<?php ...


1

So this may be hacky.. I mean, compared to overriding the default Featured Image panel/component in the Gutenberg block editor, which is not exactly hard, but this one is much simpler and basically just needs a few lines of custom coding. (read till the end to see what I mean) And I've also tried & tested it working (with both the old/classic editor ...


Only top voted, non community-wiki answers of a minimum length are eligible