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-07-19T15:17:32
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

PHP

yoast breadcrumb

1
2
3
<?php if ( function_exists('yoast_breadcrumb') ) {
	yoast_breadcrumb('<ul class="breadcrumbs"><li><span>','</span></li></ul>');
} ?>
https://snipt.net/embed/5ded47ab3e550f80aade793cff3b3493/
/raw/5ded47ab3e550f80aade793cff3b3493/
5ded47ab3e550f80aade793cff3b3493
php
PHP
3
2019-07-19T10:12:24
True
False
False
/api/public/snipt/37530/
yoast-breadcrumb
<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;yoast_breadcrumb&#39;</span><span class="p">)</span> <span class="p">)</span> <span class="p">{</span> </span><span id="L-2"><a name="L-2"></a> <span class="nx">yoast_breadcrumb</span><span class="p">(</span><span class="s1">&#39;&lt;ul class=&quot;breadcrumbs&quot;&gt;&lt;li&gt;&lt;span&gt;&#39;</span><span class="p">,</span><span class="s1">&#39;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&#39;</span><span class="p">);</span> </span><span id="L-3"><a name="L-3"></a><span class="p">}</span> <span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
breadcrumb, yoast

HTML+PHP

Drupal breadcrumb block

1
2
3
<?php if($breadcrumb) { ?>
    <div class="breadcrumb"><?php print $breadcrumb . $title; ?></div>
<?php } ?>
https://snipt.net/embed/73ed56b00fe5c739b84ed0aa0851d703/
/raw/73ed56b00fe5c739b84ed0aa0851d703/
73ed56b00fe5c739b84ed0aa0851d703
html+php
HTML+PHP
3
2019-07-18T01:34:22
True
False
False
/api/public/snipt/25886/
drupal-breadcrumb-block
<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="nv">$breadcrumb</span><span class="p">)</span> <span class="p">{</span> <span class="cp">?&gt;</span> </span><span id="L-2"><a name="L-2"></a> <span class="p">&lt;</span><span class="nt">div</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;breadcrumb&quot;</span><span class="p">&gt;</span><span class="cp">&lt;?php</span> <span class="k">print</span> <span class="nv">$breadcrumb</span> <span class="o">.</span> <span class="nv">$title</span><span class="p">;</span> <span class="cp">?&gt;</span><span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span> </span><span id="L-3"><a name="L-3"></a><span class="cp">&lt;?php</span> <span class="p">}</span> <span class="cp">?&gt;</span> </span></pre></div> </td></tr></table>
breadcrumb, drupal