Home

add_filter( ‘wp_nav_menu_items’, ‘tambahkan_link_home’, 10, 2 );
function tambahkan_link_home($items, $args) {

if (is_front_page())
$class = ‘class=”current_page_item”‘;
else
$class = ”;

$homeMenuItem =

  • ‘ .
    $args->before .
    ‘ .
    $args->link_before . ‘Home’ . $args->link_after .
    ‘ .
    $args->after .
  • ‘;

    $items = $homeMenuItem . $items;

    return $items;

    Tinggalkan Balasan

    Isikan data di bawah atau klik salah satu ikon untuk log in:

    Logo WordPress.com

    You are commenting using your WordPress.com account. Logout / Ubah )

    Gambar Twitter

    You are commenting using your Twitter account. Logout / Ubah )

    Foto Facebook

    You are commenting using your Facebook account. Logout / Ubah )

    Foto Google+

    You are commenting using your Google+ account. Logout / Ubah )

    Connecting to %s

    %d blogger menyukai ini: