Warning: curl_init() has been disabled for security reasons in /home/gusdiinf/public_html/wp-includes/Requests/Transport/cURL.php on line 95

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/gusdiinf/public_html/wp-includes/Requests/Transport/cURL.php on line 97

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/gusdiinf/public_html/wp-includes/Requests/Transport/cURL.php on line 98

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/gusdiinf/public_html/wp-includes/Requests/Transport/cURL.php on line 100

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/gusdiinf/public_html/wp-includes/Requests/Transport/cURL.php on line 103

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/gusdiinf/public_html/wp-includes/Requests/Transport/cURL.php on line 106

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/gusdiinf/public_html/wp-includes/Requests/Transport/cURL.php on line 333

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/gusdiinf/public_html/wp-includes/Requests/Transport/cURL.php on line 334

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/gusdiinf/public_html/wp-includes/Requests/Transport/cURL.php on line 363

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/gusdiinf/public_html/wp-includes/Requests/Transport/cURL.php on line 370

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/gusdiinf/public_html/wp-includes/Requests/Transport/cURL.php on line 375

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/gusdiinf/public_html/wp-includes/Requests/Transport/cURL.php on line 376

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/gusdiinf/public_html/wp-includes/Requests/Transport/cURL.php on line 377

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/gusdiinf/public_html/wp-includes/Requests/Transport/cURL.php on line 379

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/gusdiinf/public_html/wp-includes/Requests/Transport/cURL.php on line 382

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/gusdiinf/public_html/wp-includes/Requests/Transport/cURL.php on line 150

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/gusdiinf/public_html/wp-includes/Requests/Transport/cURL.php on line 151

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/gusdiinf/public_html/wp-includes/Requests/Transport/cURL.php on line 159

Warning: curl_exec() has been disabled for security reasons in /home/gusdiinf/public_html/wp-includes/Requests/Transport/cURL.php on line 162

Warning: curl_errno() expects parameter 1 to be resource, null given in /home/gusdiinf/public_html/wp-includes/Requests/Transport/cURL.php on line 167

Warning: curl_errno() expects parameter 1 to be resource, null given in /home/gusdiinf/public_html/wp-includes/Requests/Transport/cURL.php on line 167

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/gusdiinf/public_html/wp-includes/Requests/Transport/cURL.php on line 181

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/gusdiinf/public_html/wp-includes/Requests/Transport/cURL.php on line 182
Cara menambah Breadcrumb pada wordpress theme anda | Gusdwi.info

Cara menambah Breadcrumb pada wordpress theme anda

Breadcrumb adalah cara yang bagus untuk mempermudah pengunjung mengetahui di mana mereka sedang berada di situs Anda dan juga memberikan pilihan mereka dengan mudah menemukan lebih banyak posting dari kategori yang mereka hadapi.

Menambahkan Breadcrumb ke situs Anda dilakukan dalam dua langkah – tanpa sebuah plugin. Caranya  sangat mudah, cukup anda menambahkan kode di bawah ini  ke dalam file functions.php  pada tema wordpress yang anda aktifkan saat ini.

function the_breadcrumb() {
echo ‘
<ul id=”crumbs”>’;
if (!is_home()) {
echo ‘
<li><a href=”‘;
echo get_option(‘home’);
echo ‘”>’;
bloginfo(‘name’);
echo “</a></li>
“;
if (is_category() || is_single()) {
echo ‘
<li>’;
the_category(‘title_li=’);
if (is_single()) {
echo “</li>
<li>”;
the_title();
echo ‘</li>
‘;
}
} elseif (is_page()) {
echo ‘
<li>’;
echo the_title();
echo ‘</li>
‘;
}
}
elseif (is_tag()) {single_tag_title();}
elseif (is_day()) {echo”
<li>Archive for “; the_time(‘F jS, Y’); echo'</li>
‘;}
elseif (is_month()) {echo”
<li>Archive for “; the_time(‘F, Y’); echo'</li>
‘;}
elseif (is_year()) {echo”
<li>Archive for “; the_time(‘Y’); echo'</li>
‘;}
elseif (is_author()) {echo”
<li>Author Archive”; echo'</li>
‘;}
elseif (isset($_GET[‘paged’]) && !empty($_GET[‘paged’])) {echo ”
<li>Blog Archives”; echo'</li>
‘;}
elseif (is_search()) {echo”
<li>Search Results”; echo'</li>
‘;}

echo ‘</ul>
‘;
}

Kemudian, kode di bawah ini harus ditambahkan kedalam file-file tema Anda di mana Anda ingin breadcrumb akan ditampilkan (seperti: single.php, page.php archive.php dan lain lain.

<?php the_breadcrumb(); ?>

Contoh Breadcrumb :

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *