{"id":42,"date":"2013-02-18T22:52:40","date_gmt":"2013-02-18T22:52:40","guid":{"rendered":"http:\/\/krmitblog.com\/?p=42"},"modified":"2024-04-01T18:15:08","modified_gmt":"2024-04-01T18:15:08","slug":"wordpress-post-signature","status":"publish","type":"post","link":"https:\/\/krmitblog.com\/?p=42","title":{"rendered":"WordPress Post Signature"},"content":{"rendered":"<p>Thanks to a post on wpmu.org I found how to add a signature to a WordPress post by adding script in the functions.php file.<\/p>\n<p>&nbsp;<\/p>\n<pre>add_filter('the_content','add_signature');\nfunction add_signature($text) {\n\nglobal $post;\n\nif($post-&gt;post_type == 'post') $text .= '&lt;div class=\"signature\"&gt;\n&lt;img src=\"http:\/yoursite.com\/wp-content\/themes\/yourtheme\/images\/signature.png\" alt=\"signature\" \/&gt;\n&lt;\/div&gt;';\n\nreturn $text;\n}\n\nThey also suggested the following if you need to tweak the placement of the signature.\n\n<\/pre>\n<pre>div.signature img {\npadding: 5px;\n}<\/pre>\n<div class=\"signature\">\r\n<img decoding=\"async\" src=\"http:\/\/krmitblog.com\/wp-content\/uploads\/2013\/02\/krmsig1.png\" alt=\"signature\" \/>\r\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Thanks to a post on wpmu.org I found how to add a signature to a WordPress post by adding script in the functions.php file. &nbsp; add_filter(&#8216;the_content&#8217;,&#8217;add_signature&#8217;); function add_signature($text) { global $post; if($post-&gt;post_type == &#8216;post&#8217;) $text .= &#8216;&lt;div class=&#8221;signature&#8221;&gt; &lt;img src=&#8221;http:\/yoursite.com\/wp-content\/themes\/yourtheme\/images\/signature.png&#8221; alt=&#8221;signature&#8221; \/&gt; &lt;\/div&gt;&#8217;; return $text; } They also suggested the following if you need to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/krmitblog.com\/index.php?rest_route=\/wp\/v2\/posts\/42"}],"collection":[{"href":"https:\/\/krmitblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/krmitblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/krmitblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/krmitblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=42"}],"version-history":[{"count":4,"href":"https:\/\/krmitblog.com\/index.php?rest_route=\/wp\/v2\/posts\/42\/revisions"}],"predecessor-version":[{"id":128,"href":"https:\/\/krmitblog.com\/index.php?rest_route=\/wp\/v2\/posts\/42\/revisions\/128"}],"wp:attachment":[{"href":"https:\/\/krmitblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=42"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/krmitblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=42"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/krmitblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=42"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}