kinsa mga wordpress developer dinhi unsa code for nav menu sa wordpress then pwede ba ni ma insert ang php procedural type nga code sa wordpress?
kinsa mga wordpress developer dinhi unsa code for nav menu sa wordpress then pwede ba ni ma insert ang php procedural type nga code sa wordpress?
mao ni?
<?php wp_nav_menu( array('menu' => 'Project Nav' )); ?>
source: Function Reference/wp nav menu « WordPress Codex
Gi sulayan naman na nako brad pero dli lagi work out.im coding from scratch gud not ready made nga theme
Kinsa mga gahi dinhi wordpress theming na maka tutor nako para ms fullfilled ni ako skills ani ug magento theming
nkabuhat nko og daghang theme sa wordpress. nkabuhat na sd kog custom menu sa wordpress. pro mostly nga gamiton nko kay ang default menu which is kani nga code:
header.php
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'twelve columns', 'walker' => new Walker_Page_Custom, 'container' => '', 'container_class' => '' ) ); ?>
functions.php
class Walker_Page_Custom extends Walker_Nav_menu{
function start_lvl(&$output, $depth){
$indent = str_repeat("\t", $depth);
$output .= "\n$indent<div class=\"dropdown\"><ul>\n";
}
function end_lvl(&$output , $depth){
$indent = str_repeat("\t", $depth);
$output .= "$indent</ul></div>\n";
}
}
ang gamit ani nga class is mo add ug support pra sa dropdown menu.
dapat naa kay menu nga ge buhat sa wordpress sa Dashboard > Appearance > Menu and dapat imo e check ang checkbox nga Primary menu below pra ma set xa as your primary/main menu.
Similar Threads |
|