Snipt.net is closing on December 31st, 2016

For more information, please visit this blog post.

snipt

Ctrl+h for KB shortcuts

PHP

Add Header Image

1
2
3
4
5
// Add Header Image
function thematic_logo_image() {
 echo '<a href="'.get_bloginfo('url').'" title="'.get_bloginfo('name').'" ><span id="header-image"></span></a>';
}
add_action('thematic_header','thematic_logo_image',6);
https://snipt.net/embed/9075549bac6289faf544580a7cadbadf/
https://snipt.net/raw/9075549bac6289faf544580a7cadbadf/
9075549bac6289faf544580a7cadbadf
php
PHP
5
2016-12-10T08:49:22
True
False
False
/api/public/snipt/32871/
add-header-image
<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="x">// Add Header Image</span> </span><span id="L-2"><a name="L-2"></a><span class="x">function thematic_logo_image() {</span> </span><span id="L-3"><a name="L-3"></a><span class="x"> echo &#39;&lt;a href=&quot;&#39;.get_bloginfo(&#39;url&#39;).&#39;&quot; title=&quot;&#39;.get_bloginfo(&#39;name&#39;).&#39;&quot; &gt;&lt;span id=&quot;header-image&quot;&gt;&lt;/span&gt;&lt;/a&gt;&#39;;</span> </span><span id="L-4"><a name="L-4"></a><span class="x">}</span> </span><span id="L-5"><a name="L-5"></a><span class="x">add_action(&#39;thematic_header&#39;,&#39;thematic_logo_image&#39;,6);</span> </span></pre></div> </td></tr></table>
hook, thematic, wordpress

PHP

footer credit

1
2
3
4
5
6
7
// footer credit

function my_footer($thm_footertext) {
	$thm_footertext = 'Copyright &copy; 2011 Mayhem Design Studio. <a href="http://www.mayhemdesignstudio.com">mayhemdesignstudio.com</a> powered by <a href="http://www.wordpress.org">WordPress</a>.';
	return $thm_footertext;
}
add_filter('thematic_footertext', 'my_footer');
https://snipt.net/embed/66e51fe7f0eb52cf00464635a63ea945/
https://snipt.net/raw/66e51fe7f0eb52cf00464635a63ea945/
66e51fe7f0eb52cf00464635a63ea945
php
PHP
7
2016-12-10T08:49:26
True
False
False
/api/public/snipt/32867/
footer-credit
<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> <a href="#L-6">6</a> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="x">// footer credit</span> </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a><span class="x">function my_footer($thm_footertext) {</span> </span><span id="L-4"><a name="L-4"></a><span class="x"> $thm_footertext = &#39;Copyright &amp;copy; 2011 Mayhem Design Studio. &lt;a href=&quot;http://www.mayhemdesignstudio.com&quot;&gt;mayhemdesignstudio.com&lt;/a&gt; powered by &lt;a href=&quot;http://www.wordpress.org&quot;&gt;WordPress&lt;/a&gt;.&#39;;</span> </span><span id="L-5"><a name="L-5"></a><span class="x"> return $thm_footertext;</span> </span><span id="L-6"><a name="L-6"></a><span class="x">}</span> </span><span id="L-7"><a name="L-7"></a><span class="x">add_filter(&#39;thematic_footertext&#39;, &#39;my_footer&#39;);</span> </span></pre></div> </td></tr></table>
hook, thematic, wordpress
Copyrighted, illegal, or inappropriate content? Email [email protected].