Action button visibility

Is it possible for Action button to be hidden from logged in users and visible for non registered/non logged in users?

Thanks!

Yes, it can be done.

If you are using static page as front page then you have to edit front-page.php template but if you are using blog on the front page then you have to edit index.php file.

In both cases you need to replace this line of code:

<?php dazzling_call_for_action(); ?>

With this one:

<?php
if ( is_user_logged_in() ) {
// do nothing
} else {
	dazzling_call_for_action();
}
?>

If you are using Child Theme you can make these changes via Child Theme as well. Just copy/paste front-page.phpfile or index.php file to Child Theme folder and make these changes there.

Thank you very much, this worked like a charm :slight_smile: