snipt

Ctrl+h for KB shortcuts

Bash

wordpress > wget latest

wget -c http://wordpress.org/latest.tar.gz
https://snipt.net/embed/78c2d1cb9f420572b8a1b05fbe40260d/
/raw/78c2d1cb9f420572b8a1b05fbe40260d/
78c2d1cb9f420572b8a1b05fbe40260d
bash
Bash
1
2019-07-04T22:34:59
True
False
False
/api/public/snipt/4216/
wget-latest-wordpress
<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>wget -c http://wordpress.org/latest.tar.gz </span></pre></div> </td></tr></table>
linux, shell, wget, wordpress

SQL

POST Category filter wordpress

1
2
3
4
5
-- I retrive the title and the date of the post that match the criteria
SELECT post_title, post_date_gmt FROM `wp_posts` WHERE ID in
(SELECT object_id FROM `wp_term_relationships` WHERE term_taxonomy_id = 
(SELECT term_taxonomy_id FROM `wp_term_taxonomy` WHERE term_id = 
(SELECT term_id FROM `wp_terms` WHERE name='News')))
https://snipt.net/embed/9ffd00fe9cabd66188accefc8fd8174a/
/raw/9ffd00fe9cabd66188accefc8fd8174a/
9ffd00fe9cabd66188accefc8fd8174a
sql
SQL
5
2019-07-12T16:09:22
True
False
False
/api/public/snipt/3693/
post-category-filter-wordpress
<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="c1">-- I retrive the title and the date of the post that match the criteria</span> </span><span id="L-2"><a name="L-2"></a><span class="k">SELECT</span> <span class="n">post_title</span><span class="p">,</span> <span class="n">post_date_gmt</span> <span class="k">FROM</span> <span class="o">`</span><span class="n">wp_posts</span><span class="o">`</span> <span class="k">WHERE</span> <span class="n">ID</span> <span class="k">in</span> </span><span id="L-3"><a name="L-3"></a><span class="p">(</span><span class="k">SELECT</span> <span class="n">object_id</span> <span class="k">FROM</span> <span class="o">`</span><span class="n">wp_term_relationships</span><span class="o">`</span> <span class="k">WHERE</span> <span class="n">term_taxonomy_id</span> <span class="o">=</span> </span><span id="L-4"><a name="L-4"></a><span class="p">(</span><span class="k">SELECT</span> <span class="n">term_taxonomy_id</span> <span class="k">FROM</span> <span class="o">`</span><span class="n">wp_term_taxonomy</span><span class="o">`</span> <span class="k">WHERE</span> <span class="n">term_id</span> <span class="o">=</span> </span><span id="L-5"><a name="L-5"></a><span class="p">(</span><span class="k">SELECT</span> <span class="n">term_id</span> <span class="k">FROM</span> <span class="o">`</span><span class="n">wp_terms</span><span class="o">`</span> <span class="k">WHERE</span> <span class="n">name</span><span class="o">=</span><span class="s1">&#39;News&#39;</span><span class="p">)))</span> </span></pre></div> </td></tr></table>
mysql, wordpress