{"id":1281,"date":"2013-12-05T15:48:54","date_gmt":"2013-12-05T06:48:54","guid":{"rendered":"http:\/\/www.santoshkori.com\/blog\/?p=1281"},"modified":"2013-12-05T15:48:54","modified_gmt":"2013-12-05T06:48:54","slug":"how-to-check-the_content-is-empty-in-wordpress","status":"publish","type":"post","link":"https:\/\/www.santoshkori.com\/blog\/how-to-check-the_content-is-empty-in-wordpress\/","title":{"rendered":"How to Check the_content is empty in wordpress"},"content":{"rendered":"<p>Here is code to check\u00a0the_content is or not empty in wordpress.<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n&lt;?php \r\n $content = get_the_content();\r\n if(trim($content) == &quot;&quot;) {\r\n echo '&lt;p&gt;Empty Content&lt;\/p&gt;'\r\n } else {\r\n echo '&lt;p&gt;NOT Empty Content&lt;\/p&gt;';\r\n} ?&gt;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Here is code to check\u00a0the_content is or not empty in wordpress. &lt;?php $content = get_the_content(); if(trim($content) == &quot;&quot;) { echo &#8216;&lt;p&gt;Empty Content&lt;\/p&gt;&#8217; } else { echo &#8216;&lt;p&gt;NOT Empty Content&lt;\/p&gt;&#8217;; } ?&gt;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[648,646,647,645,725],"class_list":["post-1281","post","type-post","status-publish","format-standard","hentry","category-wordpress","tag-check-the_content-is-empty","tag-check-the_content-is-empty-in-wordpress","tag-how-to-check-the_content-is-empty","tag-how-to-check-the_content-is-empty-in-wordpress","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/posts\/1281","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/comments?post=1281"}],"version-history":[{"count":1,"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/posts\/1281\/revisions"}],"predecessor-version":[{"id":1282,"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/posts\/1281\/revisions\/1282"}],"wp:attachment":[{"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/media?parent=1281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/categories?post=1281"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/tags?post=1281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}