snipt

Ctrl+h for KB shortcuts

JavaScript

Fancybox open from needed index

$.fancybox.open($('.fancybox'), {index: 0});
https://snipt.net/embed/4d744b9fa5a28fda34ebe36ec7df5f47/
https://snipt.net/raw/4d744b9fa5a28fda34ebe36ec7df5f47/
4d744b9fa5a28fda34ebe36ec7df5f47
js
JavaScript
1
2016-09-23T01:37:50
True
False
False
Mar 22, 2014 at 07:02 AM
/api/public/snipt/123027/
fancybox-open-from-needed-index
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="nx">$</span><span class="p">.</span><span class="nx">fancybox</span><span class="p">.</span><span class="nx">open</span><span class="p">(</span><span class="nx">$</span><span class="p">(</span><span class="s1">&#39;.fancybox&#39;</span><span class="p">),</span> <span class="p">{</span><span class="nx">index</span><span class="o">:</span> <span class="mi">0</span><span class="p">});</span> </span></pre></div> </td></tr></table>
box, fancy, fancybox, gallery, image, images, jquery, modal, plugin

SQL

Exclude all base images from gallery

1
2
3
UPDATE mag_catalog_product_entity_media_gallery_value 
SET disabled = 1 
WHERE position = 1
https://snipt.net/embed/654c489e8fcb2bceb2e10260d6f94c10/
https://snipt.net/raw/654c489e8fcb2bceb2e10260d6f94c10/
654c489e8fcb2bceb2e10260d6f94c10
sql
SQL
3
2016-09-26T19:41:29
True
False
False
Jul 21, 2013 at 02:39 AM
/api/public/snipt/68838/
exclude-all-base-images-from-gallery
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="k">UPDATE</span> <span class="n">mag_catalog_product_entity_media_gallery_value</span> </span><span id="L-2"><a name="L-2"></a><span class="k">SET</span> <span class="n">disabled</span> <span class="o">=</span> <span class="mi">1</span> </span><span id="L-3"><a name="L-3"></a><span class="k">WHERE</span> <span class="k">position</span> <span class="o">=</span> <span class="mi">1</span> </span></pre></div> </td></tr></table>
"base image", exclude, gallery, magento

HTML+PHP

Galeria Wordpress / Gallery wordpress exclude post thumbnail

1
2
3
4
<?php  
$id = get_post_thumbnail_id(get_the_ID()); // gets the post thumbnail ID 
echo do_shortcode('[gallery exclude='.$id.' link="file" itemtag="ul" icontag="li" columns="4" size="galeria"]'); 
?>
https://snipt.net/embed/ba0005f21b3d3537f983c9dbad387d85/
https://snipt.net/raw/ba0005f21b3d3537f983c9dbad387d85/
ba0005f21b3d3537f983c9dbad387d85
html+php
HTML+PHP
4
2016-09-22T18:40:55
True
False
False
/api/public/snipt/42206/
galeria-wordpress-gallery-wordpress-exclude-post-thumbnail
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> </span><span id="L-2"><a name="L-2"></a><span class="nv">$id</span> <span class="o">=</span> <span class="nx">get_post_thumbnail_id</span><span class="p">(</span><span class="nx">get_the_ID</span><span class="p">());</span> <span class="c1">// gets the post thumbnail ID </span> </span><span id="L-3"><a name="L-3"></a><span class="k">echo</span> <span class="nx">do_shortcode</span><span class="p">(</span><span class="s1">&#39;[gallery exclude=&#39;</span><span class="o">.</span><span class="nv">$id</span><span class="o">.</span><span class="s1">&#39; link=&quot;file&quot; itemtag=&quot;ul&quot; icontag=&quot;li&quot; columns=&quot;4&quot; size=&quot;galeria&quot;]&#39;</span><span class="p">);</span> </span><span id="L-4"><a name="L-4"></a><span class="cp">?&gt;</span> </span></pre></div> </td></tr></table>
exclude, gallery, thumbnail, wordpress
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.