{"id":5602316,"date":"2014-12-22T14:09:57","date_gmt":"2014-12-22T14:09:57","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/is_user_logged_in-3\/"},"modified":"2016-08-22T13:45:57","modified_gmt":"2016-08-22T13:45:57","slug":"is_user_logged_in-3","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/is_user_logged_in-3\/","title":{"rendered":"is_user_logged_in()"},"content":{"rendered":"<p>Hello &#8211; Is there a special way to use the following code to display information based on whether the user is logged-in or logged-out?<\/p>\n<pre><code>&lt;?php if (is_user_logged_in() ): ?&gt;\n &lt;?php else: ?&gt;\n&lt;?php endif ?&gt;<\/code><\/pre>\n<p>i tried replacing each &lt;?php with [insert_php] and ?&gt; with [\/insert_php], but it doesn&#8217;t seem to be working.<\/p>\n<p>thanks!<\/p>\n<p>https:\/\/wordpress.org\/plugins\/insert-php\/<\/p>\n","protected":false},"template":"","class_list":["post-5602316","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5602316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5602316\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=5602316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}