{"id":5574,"date":"2016-02-09T11:11:57","date_gmt":"2016-02-09T19:11:57","guid":{"rendered":"http:\/\/www.dognmonkey.com\/techs\/?p=5574"},"modified":"2017-11-14T10:45:24","modified_gmt":"2017-11-14T18:45:24","slug":"galleria-io-in-wordpress","status":"publish","type":"post","link":"https:\/\/www.dognmonkey.com\/techs\/galleria-io-in-wordpress.html","title":{"rendered":"Galleria.io In WordPress"},"content":{"rendered":"<p>[bs][galleria][galleria_start]<br \/>\n<em><a href=\"\/\/galleria.io\" target=\"_blank\" rel=\"noopener\">Galleria.io<\/a> is a very nice gallery display for website, but the classic version is very basic and not very well documented to get it working responsively like the paid version, at least in my opinion. I finally customized the classic version so I can use with WordPress, but I think I prefer\u00a0<a href=\"\/\/fotorama.io\" target=\"_blank\" rel=\"noopener\">Fotorama.io<\/a>\u00a0for my blogs. I just write up how I customized the Galleria.io to work with my responsive theme nicely. The &#8220;Fatal error: Could not extract a stage height from the CSS. Traced height: 0px&#8221; happens quite often until you set the &#8220;wait: 10000&#8221; = 10 sec from default of 5sec. The Responsive is not working every well across viewports and devices until you customize your own CSS. FWIW, it&#8217;s quite a nice galleries display for the website.<\/em>[galleria_div]<a href=\"\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/z_iphone6_340px.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-thumbnail wp-image-5582\" src=\"\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/z_iphone6_340px-200x112.jpg\" alt=\"Diplay on iphone6 340px width\" width=\"200\" height=\"112\" \/><\/a> <a href=\"\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/z_iphone6_768px.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-thumbnail wp-image-5583\" src=\"\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/z_iphone6_768px-200x112.jpg\" alt=\"Diplay on iphone6 768px width\" width=\"200\" height=\"112\" srcset=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/z_iphone6_768px-200x112.jpg 200w, https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/z_iphone6_768px-300x169.jpg 300w, https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/z_iphone6_768px.jpg 600w\" sizes=\"auto, (max-width: 200px) 100vw, 200px\" \/><\/a>\u00a0<a href=\"\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/z_fatal_error.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-thumbnail wp-image-5585\" src=\"\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/z_fatal_error-200x112.jpg\" alt=\"5 sec wait fatal error\" width=\"200\" height=\"112\" \/><\/a><a href=\"\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/z_desktop.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-thumbnail wp-image-5610\" src=\"\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/z_desktop-200x112.jpg\" alt=\"desktop display\" width=\"200\" height=\"112\" \/><\/a>[\/galleria_div][galleria_end]<\/p>\n<p style=\"text-align: center;\"><em>[mybs data=&#8221;1&#8243; title=&#8221;Shortcodes for Galleria.io&#8221;]<\/em><\/p>\n<blockquote>\n<p style=\"text-align: left;\">add_shortcode( &#8216;galleria&#8217;, &#8216;mygalleria&#8217; );<br \/>\nfunction mygalleria() {<br \/>\nreturn<br \/>\n&#8216;&lt;script src=&#8221;\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1\/jquery.js&#8221;&gt;&lt;\/script&gt;&lt;script src=&#8221;\/idogjs\/galleria\/galleria-1.4.2.min.js&#8221;&gt;&lt;\/script&gt;<br \/>\n&lt;script type=&#8221;text\/javascript&#8221;&gt;<br \/>\nvar $Galleria=jQuery.noConflict();<br \/>\n$Galleria(document).ready(function(){<br \/>\n});<br \/>\n&lt;\/script&gt;&#8217;<br \/>\n; }<br \/>\nadd_shortcode( &#8216;galleria_end&#8217;, &#8216;mygalleria_end&#8217; );<br \/>\nfunction mygalleria_end() {<br \/>\nreturn<br \/>\n&#8216;&lt;script src=&#8221;\/idogjs\/galleria\/galleria_end.js&#8221; type=&#8221;text\/javascript&#8221;&gt;&lt;\/script&gt;&#8217;<br \/>\n; }<br \/>\nadd_shortcode( &#8216;galleria_start&#8217;, &#8216;mygalleria_start&#8217; );<br \/>\nfunction mygalleria_start() {<br \/>\nreturn<br \/>\n&#8216;&lt;script src=&#8221;\/idogjs\/galleria\/galleria_start.js&#8221; type=&#8221;text\/javascript&#8221;&gt;&lt;\/script&gt;&#8217;<br \/>\n; }<br \/>\nadd_shortcode( &#8216;galleria_div&#8217;, &#8216;galleriadiv&#8217; );<br \/>\nfunction galleriadiv($atts, $content = null) {<br \/>\nextract(shortcode_atts(array(<br \/>\n&#8216;data&#8217; =&gt; &#8221;,<br \/>\n), $atts));<br \/>\nreturn<br \/>\n&#8216;&lt;div class=&#8221;galleria&#8221;&gt;&#8217;.$content.'&lt;\/div&gt;&#8217;<br \/>\n; }<\/p>\n<\/blockquote>\n<p style=\"text-align: center;\">[\/mybs]<\/p>\n<p style=\"text-align: center;\"><em>[mybs data=&#8221;2&#8243; title=&#8221;Custom Scripts&#8221;]<\/em><\/p>\n<p style=\"text-align: center;\">galleria_start.js<\/p>\n<blockquote>\n<p style=\"text-align: left;\"><em>if (Galleria) { $Gallery(&#8220;body&#8221;).text(&#8216;Galleria works&#8217;) }<\/em><\/p>\n<\/blockquote>\n<p style=\"text-align: center;\">galleria_end.js<\/p>\n<blockquote>\n<p style=\"text-align: left;\">Galleria.loadTheme(&#8216;\/idogjs\/galleria\/themes\/classic\/galleria.classic.min.js&#8217;);<br \/>\nGalleria.run(&#8216;.galleria&#8217;, {<br \/>\nlightbox: true,<br \/>\nresponsive: true,<br \/>\nwait: 10000,<br \/>\nshowInfo: true<br \/>\n});<\/p>\n<\/blockquote>\n<p style=\"text-align: center;\">[\/mybs]<\/p>\n<p style=\"text-align: center;\">[mybs data=&#8221;3&#8243; title=&#8221;CSS for responsive display&#8221;]<\/p>\n<blockquote>\n<p style=\"text-align: left;\">.galleria{background:#000;width:800px;height:600px;}@media all and (max-width:768px){.galleria{background:#000;width:500px;height:360px;}@media screen and (max-width:380px){.galleria{background:#000;width:340px;height:290px;}@media all and (max-width:480px){.galleria{background:#000;width:340px;height:290px;}<\/p>\n<\/blockquote>\n<p style=\"text-align: center;\">[\/mybs]<\/p>\n<p style=\"text-align: center;\"><em>[mybs data=&#8221;4&#8243; title=&#8221;Usage&#8221;]<\/em><\/p>\n<blockquote>\n<p style=\"text-align: left;\">[ galleria ]<\/p>\n<p style=\"text-align: left;\">[ galleria_start ]<\/p>\n<p style=\"text-align: left;\">[ galleria_div ]&lt;a href=&#8221;\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/z_iphone6_340px.jpg&#8221;&gt;&lt;img class=&#8221;alignnone size-thumbnail wp-image-5582&#8243; src=&#8221;\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/z_iphone6_340px-200&#215;112.jpg&#8221; alt=&#8221;Diplay on iphone6 340px width&#8221; width=&#8221;200&#8243; height=&#8221;112&#8243; \/&gt;&lt;\/a&gt;<\/p>\n<p style=\"text-align: left;\">Remove rel=&#8221;xxx&#8221; in the href= from media uploader for lightbox to work. alt=&#8221;xxx&#8221; will display as title by default<\/p>\n<p style=\"text-align: left;\">[\/galleria_div ]<\/p>\n<p style=\"text-align: left;\">[ galleria_end ]<\/p>\n<\/blockquote>\n<p>[\/mybs]<\/p>\n<ul class=\"lcp_catlist\" id=\"lcp_instance_0\"><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>[bs][galleria][galleria_start] Galleria.io is a very nice gallery display for website, but the classic version is very basic and not very well documented to get it working responsively like the paid version, at least in my opinion. I finally customized the classic version so I can use with WordPress, but I think I prefer\u00a0Fotorama.io\u00a0for my blogs. <a href=\"https:\/\/www.dognmonkey.com\/techs\/galleria-io-in-wordpress.html\" class=\"more-link\">&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[807,20],"tags":[821,822],"class_list":["post-5574","post","type-post","status-publish","format-standard","hentry","category-scripts","category-wordpress","tag-galleria-io","tag-wordpress-gallery"],"views":361,"_links":{"self":[{"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/posts\/5574","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/comments?post=5574"}],"version-history":[{"count":3,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/posts\/5574\/revisions"}],"predecessor-version":[{"id":6597,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/posts\/5574\/revisions\/6597"}],"wp:attachment":[{"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/media?parent=5574"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/categories?post=5574"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/tags?post=5574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}