I'm trying to replace the main content area on individual pages to say Coming soon (on two pages, but not the rest of the website). Also only want to make it so people who aren't logged in see the coming soon page and people who are logged in see the actual page, so it can be worked on. So far I have this code, which doesn't work.
add_action( 'the_content', ‘ind_coming_soon_page’ );
function ind_coming_soon_page( $content ) {
if ( is_user_logged_in() ) {
return;
} else {
if (is_page( 10142 || 9035 )) {
echo “Coming Soon”;
} else {
return $content;
}
}
}
I keep getting the error below when trying to enable the plugin (and I don't know it works yet either), the error relates to line 18 which is echo "Coming Soon!";
:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /var/www/vhosts/vagish.com/httpdocs/wp-content/plugins/test/coming-soon.php on line 18