{"id":112,"date":"2021-11-27T04:14:54","date_gmt":"2021-11-27T04:14:54","guid":{"rendered":"https:\/\/writingagame.com\/?p=112"},"modified":"2021-11-28T03:53:49","modified_gmt":"2021-11-28T03:53:49","slug":"fix-1-images","status":"publish","type":"post","link":"https:\/\/writingagame.com\/index.php\/2021\/11\/27\/fix-1-images\/","title":{"rendered":"WordPress fix 1. Image settings"},"content":{"rendered":"\n<p>1. <strong>How to hide featured image from the post body<\/strong><br>I am very happy that my template (Nirmala) does NOT generate post thumbnails automatically from post images, since not every post needs them. You always can add so called \u201cfeatured image\u201d to your post to generate thumbnails.<\/p>\n\n\n\n<p>However, when featured image added, WordPress automatically inserts it in front of your post\u2019s body too, not where I\u2019d like to see it in the post. If I\u2019d need it over there, I\u2019d add it manually, as any other image. My attempts to find a setting responsible for this failed. Turned out that settings are limited to a very basic set provided by WordPress itself, plus whatever template\u2019s author decided to make customizable. I even found a file theme.css on the server, which I guess is responsible for this behavior. But how to determine that specific line of code??<\/p>\n\n\n\n<p>However, professionals have their own ways.<\/p>\n\n\n\n<p><strong>Professional advice from IndoCreativeMedia (authors of Nirmala template):<\/strong><\/p>\n\n\n\n<p>To customize the theme, it is better to not write codes directly to the theme&#8217;s style.css. You will lose your codes every time the theme is updated.<\/p>\n\n\n\n<p>Go to <em>Dashboard -&gt; Appearance -&gt; Customize<\/em><\/p>\n\n\n\n<p>Use the <strong>Additional CSS<\/strong> section.<\/p>\n\n\n\n<p>To hide the &#8216;featured image&#8217; on single page, add this css code to Custom CSS:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: css; title: ; notranslate\" title=\"\">\n.single-post .wp-post-image {\ndisplay: none!important;\n}\n<\/pre><\/div>\n\n\n<ul class=\"wp-block-list\"><li>Don&#8217;t forget the first dot in .single-post.<\/li><\/ul>\n\n\n\n<p><strong>Publish<\/strong>.<\/p>\n\n\n\n<p><strong>Before:<\/strong><\/p>\n\n\n\n<p><img decoding=\"async\" src=\"https:\/\/writingagame.com\/img\/b02\/c01\/01.jpg\"><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>On the top &#8211; automatically inserted \u201cfeatured image\u201d.<\/li><\/ul>\n\n\n\n<p><strong>After:<\/strong><\/p>\n\n\n\n<p><img decoding=\"async\" src=\"https:\/\/writingagame.com\/img\/b02\/c01\/02.jpg\"><\/p>\n\n\n\n<p>Not any more!<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>2. <strong>Image borders<\/strong><\/p>\n\n\n\n<p>Since in my case most images are a screenshots on white background, very often they are \u201cblended\u201d with the text. Hard to tell where is a text and where is a picture. So, setting image borders would be a brilliant solution. But I need them (borders) inside posts ONLY.<\/p>\n\n\n\n<p>Solution: add following code  to Custom CSS: <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\n#single-wrapper img {\n    border: 5px solid silver;\n}\n<\/pre><\/div>\n\n\n<p>Then \u2013 <strong>Publish<\/strong>.<\/p>\n\n\n\n<p>You can see borders on this page.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p class=\"mb-2\">1. How to hide featured image from the post bodyI am very happy that my template (Nirmala) does NOT generate post thumbnails automatically from post images, since not every post needs them. You always can add so called \u201cfeatured image\u201d to your post to generate thumbnails. However, when featured image added, WordPress automatically inserts it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-112","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"_links":{"self":[{"href":"https:\/\/writingagame.com\/index.php\/wp-json\/wp\/v2\/posts\/112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/writingagame.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/writingagame.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/writingagame.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/writingagame.com\/index.php\/wp-json\/wp\/v2\/comments?post=112"}],"version-history":[{"count":13,"href":"https:\/\/writingagame.com\/index.php\/wp-json\/wp\/v2\/posts\/112\/revisions"}],"predecessor-version":[{"id":293,"href":"https:\/\/writingagame.com\/index.php\/wp-json\/wp\/v2\/posts\/112\/revisions\/293"}],"wp:attachment":[{"href":"https:\/\/writingagame.com\/index.php\/wp-json\/wp\/v2\/media?parent=112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/writingagame.com\/index.php\/wp-json\/wp\/v2\/categories?post=112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/writingagame.com\/index.php\/wp-json\/wp\/v2\/tags?post=112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}