{"id":316,"date":"2011-08-09T12:07:14","date_gmt":"2011-08-09T11:07:14","guid":{"rendered":"http:\/\/schueler.ws\/?p=316"},"modified":"2014-12-26T20:13:52","modified_gmt":"2014-12-26T19:13:52","slug":"wordpress-nextgen-gallery-einzelbilder-mit-bildunterschrift","status":"publish","type":"post","link":"https:\/\/schueler.ws\/en\/wordpress-nextgen-gallery-einzelbilder-mit-bildunterschrift\/","title":{"rendered":"WordPress: Nextgen-Gallery single pictures with captions"},"content":{"rendered":"<p>For sets of pictures I like the NextGen-Plugin (nextgen-gallery). It allows very easy gallery views of pictures and &#8211; what is also important &#8211; the internal media library of WordPress in enhanced by the thematic storing of the pictures.<\/p>\n<p>In practice this means I often use pics from galleries also as single pictures in articles. Nextgen-Gallery has a [ singlepic ] feature, but unfourtunately it doesn&#8217;t show captions.  That&#8217;s realy sucks.<\/p>\n<p>A web search shows me the principle how it canbe solved but I didn&#8217;t found a ready to use solution that looks OK. So I write my own and provide it to a free usage.<\/p>\n<p>My solution: Use the singlepic-caption.php from the download below and add your image as follows to the article (remove the spaces befor and after the square brackets:<\/p>\n<p>[ singlepic id=2 w=320 h=240 float=none template=caption ]<\/p>\n<p>The template=caption statement lets use the singlepic-caption.php instead of singlepic.php<\/p>\n<p>In my template the text from the title-field is used as caption. In the fullscreen view the normally longer text from the description field is used.<\/p>\n<p><a href=\"http:\/\/schueler.ws\/wp-content\/uploads\/2011\/08\/gallerysample.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/schueler.ws\/wp-content\/uploads\/2011\/08\/gallerysample.png\" alt=\"\" title=\"gallerysample\" width=\"582\" height=\"125\" class=\"alignnone size-full wp-image-328\" srcset=\"https:\/\/schueler.ws\/wp-content\/uploads\/2011\/08\/gallerysample.png 582w, https:\/\/schueler.ws\/wp-content\/uploads\/2011\/08\/gallerysample-300x64.png 300w\" sizes=\"auto, (max-width: 582px) 100vw, 582px\" \/><\/a><\/p>\n<p>For a besser separation from the normal text the caption is one step smaller than the normal text and set in italic. I also add an additional vertical space to separate the image better.<\/p>\n<p>It looks like this:<\/p>\nngg_shortcode_1_placeholder<p><em><font size=-1>Jahreswechsel 2010\/2011: Der Winter schl\u00e4gt richtig zu<\/font><\/em>&nbsp;<br><\/p>\n<p>I haven&#8217;t translated the german caption in this example, so that the link to the image from the input mask get not lost. The caption means: &#8220;The Winter 2010\/2011 was unusual heavy&#8221;. And the long version in the full screen: &#8220;Because of the snow the streets have been made to one way streets, but for all that we don&#8217;t know where to bring the whole snow.&#8221;<\/p>\n<p>The template can be downloaded here:<\/p>\n<a href=\"https:\/\/schueler.ws\/en\/?ddownload=1162\" title=\"Download\" rel=\"nofollow\" class=\"ddownload-button button-green id-1162 ext-zip\">Download<\/a>\n<p>It must be extracted and copied to \/wordpress\/wp-content\/plugins\/nextgen-gallery\/view\/ . And these must be done also after every update of nextgen-gallery because the update deletes the whole directory.<\/p>\n<p><strong>Update January 2014<\/strong><\/p>\n<p>NextGen-Versions from 2.x is no longer compatible to this (and many other) add-on. If you want to use the singlepic-caption template and\/or if you don&#8217;t want to edit all your past posts, please <a href=\"http:\/\/schueler.ws\/?p=926&#038;lang=en\" title=\"NextCellent-Gallery anstelle NextGen-Gallery\" target=\"_blank\">use the NextCellent gallery instead<\/a>.<\/p>\n<p><strong> Update December 2014, Version 1.1 <\/strong><\/p>\n<p>Adapted to the newest version of NextCellent-Gallery<br \/>\nSolved a problem with getimagesize and disabled &#8220;allow_url_fopen&#8221; option in the php.ini<\/p>\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>For sets of pictures I like the NextGen-Plugin (nextgen-gallery). It allows very easy gallery views of pictures and &#8211; what is also important &#8211; the internal media library of WordPress in enhanced by the thematic storing of the pictures. In &hellip; <a href=\"https:\/\/schueler.ws\/en\/wordpress-nextgen-gallery-einzelbilder-mit-bildunterschrift\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","ngg_post_thumbnail":0,"footnotes":""},"categories":[51],"tags":[52],"class_list":["post-316","post","type-post","status-publish","format-standard","hentry","category-it","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/schueler.ws\/en\/wp-json\/wp\/v2\/posts\/316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/schueler.ws\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/schueler.ws\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/schueler.ws\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/schueler.ws\/en\/wp-json\/wp\/v2\/comments?post=316"}],"version-history":[{"count":22,"href":"https:\/\/schueler.ws\/en\/wp-json\/wp\/v2\/posts\/316\/revisions"}],"predecessor-version":[{"id":346,"href":"https:\/\/schueler.ws\/en\/wp-json\/wp\/v2\/posts\/316\/revisions\/346"}],"wp:attachment":[{"href":"https:\/\/schueler.ws\/en\/wp-json\/wp\/v2\/media?parent=316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/schueler.ws\/en\/wp-json\/wp\/v2\/categories?post=316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/schueler.ws\/en\/wp-json\/wp\/v2\/tags?post=316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}