snipt

Ctrl+h for KB shortcuts

PHP

Replace 'Home' with image when using the Breadcrumb Trail plugin

1
2
3
<?php if ( function_exists( 'breadcrumb_trail' ) ) breadcrumb_trail(array('separator' => '&gt;', 'before' => '', 'show_home' => '<img src="' . get_bloginfo('template_directory') . '/img/bread-house.png" />' ));; ?>

ref: http://themehybrid.com/plugins/breadcrumb-trail
https://snipt.net/embed/ff61a889097267d9615291f4231eb32b/
/raw/ff61a889097267d9615291f4231eb32b/
ff61a889097267d9615291f4231eb32b
php
PHP
3
2019-08-21T01:03:01
True
False
False
/api/public/snipt/41967/
replace-home-with-image-when-using-the-breadcrumb-trail-plugin
<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></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;breadcrumb_trail&#39;</span> <span class="p">)</span> <span class="p">)</span> <span class="nx">breadcrumb_trail</span><span class="p">(</span><span class="k">array</span><span class="p">(</span><span class="s1">&#39;separator&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;&amp;gt;&#39;</span><span class="p">,</span> <span class="s1">&#39;before&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;&#39;</span><span class="p">,</span> <span class="s1">&#39;show_home&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;&lt;img src=&quot;&#39;</span> <span class="o">.</span> <span class="nx">get_bloginfo</span><span class="p">(</span><span class="s1">&#39;template_directory&#39;</span><span class="p">)</span> <span class="o">.</span> <span class="s1">&#39;/img/bread-house.png&quot; /&gt;&#39;</span> <span class="p">));;</span> <span class="cp">?&gt;</span><span class="x"></span> </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a><span class="x">ref: http://themehybrid.com/plugins/breadcrumb-trail</span> </span></pre></div> </td></tr></table>
breadcrumb, hybrid, wordpress