snipt

Ctrl+h for KB shortcuts

HTML+PHP

Most Commented

<?php if (function_exists('mdv_most_commented')) mdv_most_commented(); ?>
https://snipt.net/embed/6b253c18f4dc14a290dbf144d718239d/
/raw/6b253c18f4dc14a290dbf144d718239d/
6b253c18f4dc14a290dbf144d718239d
html+php
HTML+PHP
1
2019-07-11T22:07:22
True
False
False
/api/public/snipt/718/
most-commented
<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></span><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> <span class="k">if</span> <span class="p">(</span><span class="nb">function_exists</span><span class="p">(</span><span class="s1">&#39;mdv_most_commented&#39;</span><span class="p">))</span> <span class="nx">mdv_most_commented</span><span class="p">();</span> <span class="cp">?&gt;</span> </span></pre></div> </td></tr></table>
plugins

HTML+PHP

Most Viewed

<?php if (function_exists('get_most_viewed')) { get_most_viewed(); } ?>
https://snipt.net/embed/b783f5ff88728cbb6fc213b9277aeaf5/
/raw/b783f5ff88728cbb6fc213b9277aeaf5/
b783f5ff88728cbb6fc213b9277aeaf5
html+php
HTML+PHP
1
2019-08-13T10:20:11
True
False
False
/api/public/snipt/717/
most-viewed
<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></span><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> <span class="k">if</span> <span class="p">(</span><span class="nb">function_exists</span><span class="p">(</span><span class="s1">&#39;get_most_viewed&#39;</span><span class="p">))</span> <span class="p">{</span> <span class="nx">get_most_viewed</span><span class="p">();</span> <span class="p">}</span> <span class="cp">?&gt;</span> </span></pre></div> </td></tr></table>
plugins

HTML+PHP

Top Commentators

<?php if (function_exists('ns_show_top_commentators')) ns_show_top_commentators(); ?>
https://snipt.net/embed/4d9fea5b8a3ff610f681e5b1372e3239/
/raw/4d9fea5b8a3ff610f681e5b1372e3239/
4d9fea5b8a3ff610f681e5b1372e3239
html+php
HTML+PHP
1
2019-08-17T16:31:58
True
False
False
/api/public/snipt/716/
top-commentators
<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></span><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> <span class="k">if</span> <span class="p">(</span><span class="nb">function_exists</span><span class="p">(</span><span class="s1">&#39;ns_show_top_commentators&#39;</span><span class="p">))</span> <span class="nx">ns_show_top_commentators</span><span class="p">();</span> <span class="cp">?&gt;</span> </span></pre></div> </td></tr></table>
plugins

HTML+PHP

WP List Archives

<?php wp_get_archives('type=postbypost&limit=10&format=custom&before=<li>&after=</li>'); ?>
https://snipt.net/embed/4c97c17794af99b94e735250b7fbc549/
/raw/4c97c17794af99b94e735250b7fbc549/
4c97c17794af99b94e735250b7fbc549
html+php
HTML+PHP
1
2019-07-14T19:48:32
True
False
False
/api/public/snipt/715/
wp-list-archives
<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></span><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> <span class="nx">wp_get_archives</span><span class="p">(</span><span class="s1">&#39;type=postbypost&amp;limit=10&amp;format=custom&amp;before=&lt;li&gt;&amp;after=&lt;/li&gt;&#39;</span><span class="p">);</span> <span class="cp">?&gt;</span> </span></pre></div> </td></tr></table>
list

HTML+PHP

Get Recent Comments

<?php if (function_exists('get_recent_comments')) get_recent_comments(); ?>
https://snipt.net/embed/eacf3684266db223ba64c2ec9019c906/
/raw/eacf3684266db223ba64c2ec9019c906/
eacf3684266db223ba64c2ec9019c906
html+php
HTML+PHP
1
2019-07-30T12:37:54
True
False
False
/api/public/snipt/714/
get-recent-comments
<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></span><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> <span class="k">if</span> <span class="p">(</span><span class="nb">function_exists</span><span class="p">(</span><span class="s1">&#39;get_recent_comments&#39;</span><span class="p">))</span> <span class="nx">get_recent_comments</span><span class="p">();</span> <span class="cp">?&gt;</span> </span></pre></div> </td></tr></table>
plugins

HTML+PHP

WP List Blogroll

<?php get_links(-1, '<li>', '</li>', '', TRUE, 'url', FALSE); ?>
https://snipt.net/embed/93dac9b1fa79cdeb784bc952e8a1e63e/
/raw/93dac9b1fa79cdeb784bc952e8a1e63e/
93dac9b1fa79cdeb784bc952e8a1e63e
html+php
HTML+PHP
1
2019-08-18T23:11:09
True
False
False
/api/public/snipt/713/
wp-list-blogroll
<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></span><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> <span class="nx">get_links</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="s1">&#39;&lt;li&gt;&#39;</span><span class="p">,</span> <span class="s1">&#39;&lt;/li&gt;&#39;</span><span class="p">,</span> <span class="s1">&#39;&#39;</span><span class="p">,</span> <span class="k">TRUE</span><span class="p">,</span> <span class="s1">&#39;url&#39;</span><span class="p">,</span> <span class="k">FALSE</span><span class="p">);</span> <span class="cp">?&gt;</span> </span></pre></div> </td></tr></table>
list

MySQL

find duplicates mysql

1
2
3
4
5
SELECT name,
COUNT(name) AS NumOccurrences
FROM nt_projects
GROUP BY name
HAVING ( COUNT(name) > 1 )
https://snipt.net/embed/63ef7f626c15a01c2ca2f2781234e861/
/raw/63ef7f626c15a01c2ca2f2781234e861/
63ef7f626c15a01c2ca2f2781234e861
mysql
MySQL
5
2019-08-01T01:51:37
True
False
False
/api/public/snipt/706/
find-duplicates-mysql
<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> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="k">SELECT</span> <span class="n">name</span><span class="p">,</span> </span><span id="L-2"><a name="L-2"></a><span class="nf">COUNT</span><span class="p">(</span><span class="n">name</span><span class="p">)</span> <span class="k">AS</span> <span class="n">NumOccurrences</span> </span><span id="L-3"><a name="L-3"></a><span class="k">FROM</span> <span class="n">nt_projects</span> </span><span id="L-4"><a name="L-4"></a><span class="k">GROUP</span> <span class="k">BY</span> <span class="n">name</span> </span><span id="L-5"><a name="L-5"></a><span class="k">HAVING</span> <span class="p">(</span> <span class="nf">COUNT</span><span class="p">(</span><span class="n">name</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">1</span> <span class="p">)</span> </span></pre></div> </td></tr></table>
mysql

Text only

reload apache server

/etc/init.d/apache2 force-reload
https://snipt.net/embed/68e981180198e8e8eea412e9eea4f73a/
/raw/68e981180198e8e8eea412e9eea4f73a/
68e981180198e8e8eea412e9eea4f73a
text
Text only
2
2019-07-25T19:11:12
True
False
False
/api/public/snipt/700/
reload-apache-server
<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></span><span id="L-1"><a name="L-1"></a>/etc/init.d/apache2 force-reload </span></pre></div> </td></tr></table>
apache, terminal