Custom Snippet

Use this tool to share WordPress snippets with the community.

  Save Snippet
<?php
if ( is_user_logged_in() ) {
    echo 'Welcome, registered user!';
} else {
    echo 'Welcome, visitor!';
}
?>