• 24-12-2013, 21:39:36
    #1
    Sorunu uzun bir uğraşın ardından kendim aştım. Benim gibi sorun yaşayan olursa aşağıda vereceğim linkteki menüyü kullanıp kendilerine göre editlesinler.

    http://wplift.com/wordpress-custom-m...dvice-and-help

    Fonksiyon dosyasına eklenecek kodlar:
    register_nav_menu( 'header-menu', 'Header Menu');
    
    	// Or you can register multiple menus at once:
    register_nav_menus(
       		array(
         			'header-menu' => __( 'Header Menu' ),
         			'Top-menu' => __( 'Top Menu' )
       		)
    		  );
    Menüyü ekleyeceğimiz yere eklenecek kodlar:

    <nav id="access" role="navigation">
    
    				<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
    			</nav>
    Ve son olarak css kodlarımız:

    /*
    First we prepare the navigation menu bar
     */
    #access {
    	background: #4572BF; /* Show a solid color for older browsers */
    	background: -moz-linear-gradient(#4572BF, #6187C7);
    	background: -o-linear-gradient(#4572BF, #6187C7);
    	background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#4572BF), to(#6187C7)); /* older webkit syntax */
    	background: -webkit-linear-gradient(#4572BF, #6187C7);
    	-webkit-box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 2px;
    	-moz-box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 2px;
    	box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 2px;
    	clear: both;
    	display: block;
    	float: left;
    	margin: 0 auto 6px;
    	width: 100%;
    }
    
    /*
    Now we style the unordered list, hover effect, and sub menus
     */
    
    #access ul {
    	font-size: 13px;
    	list-style: none;
    	margin: 0 0 0 -0.8125em;
    	padding-left: 0;
    }
    #access li {
    	float: left;
    	position: relative;
    }
    #access a {
    	color: #eee;
    	display: block;
    	line-height: 3.333em;
    	padding: 0 1.2125em;
    	text-decoration: none;
    }
    #access ul ul {
    	-moz-box-shadow: 0 3px 3px rgba(0,0,0,0.2);
    	-webkit-box-shadow: 0 3px 3px rgba(0,0,0,0.2);
    	box-shadow: 0 3px 3px rgba(0,0,0,0.2);
    	display: none;
    	float: left;
    	margin: 0;
    	position: absolute;
    	top: 3.333em;
    	left: 0;
    	width: 188px;
    	z-index: 99999;
    }
    #access ul ul ul {
    	left: 100%;
    	top: 0;
    }
    #access ul ul a {
    	background: #f9f9f9;
    	border-bottom: 1px dotted #ddd;
    	color: #444;
    	font-size: 13px;
    	font-weight: normal;
    	height: auto;
    	line-height: 1.4em;
    	padding: 10px 10px;
    	width: 168px;
    }
    #access li:hover > a,
    #access ul ul :hover > a,
    #access a:focus {
    	background: #efefef;
    }
    #access li:hover > a,
    #access a:focus {
    	background: #f9f9f9; /* Show a solid color for older browsers */
    	background: -moz-linear-gradient(#f9f9f9, #e5e5e5);
    	background: -o-linear-gradient(#f9f9f9, #e5e5e5);
    	background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#f9f9f9), to(#e5e5e5)); /* Older webkit syntax */
    	background: -webkit-linear-gradient(#f9f9f9, #e5e5e5);
    	color: #373737;
    }
    #access ul li:hover > ul {
    	display: block;
    }
    /*
    Styling the currently rendered page
     */
    #access .current-menu-item > a,
    #access .current-menu-ancestor > a,
    #access .current_page_item > a,
    #access .current_page_ancestor > a {
    	font-weight: bold;
    }
    Aşağıdaki menüyü wp'ye entegre edip kullanmaya çalışıyorum ancak başaramadım. Bu konuda bana yardımcı olmanızı bekliyorum. İyi çalışmalar.

     <div class="menu">
            <ul>
                <li class="acilir"><a href="#">Ana Sayfa</a>
                	<ul>
                        <li><a href="#">Kurumsal</a></li>
                        <li><a href="#">Kurumsal</a></li>
                        <li><a href="#">Kurumsal</a></li>
                    </ul>
                </li>
                <li><a href="#">Kurumsal</a></li>
                <li><a href="#">Birimler</a></li>
                <li  class="acilir"><a href="#">Bilgi Edinme</a>
                <ul>
                        <li><a href="#">Deneme</a></li>
                        <li><a href="#">Deneme</a></li>
                        <li><a href="#">Deneme</a></li>
                    </ul>
                </li>
                <li><a href="#">E-hizmetler</a></li>
                <li><a href="#">İletişim</a></li>
            </ul>
        </div>
  • 24-12-2013, 21:58:09
    #2
    Wordpress'e entegre edip + js yazmak gerekiyor hocam ama neden böyle bir şey yapıyorsunuz anlamadm wordpresste zaten menü desteği var ?
  • 24-12-2013, 23:43:18
    #3
    Wordpress'e kendim 1 sayfalık ana sayfa oluşturdum. Birinci olarak buraya eklemem gerekiyor. İkincisi Wp menüsü olarak da bu özel menümü kullanmak istiyorum. Menü css ve js'le oluşturulmuş açılır menü. Yardımcı olabilirseniz nasıl ekleyebileceğimi anlatın.

    Cuslaw adlı üyeden alıntı: mesajı görüntüle
    Wordpress'e entegre edip + js yazmak gerekiyor hocam ama neden böyle bir şey yapıyorsunuz anlamadm wordpresste zaten menü desteği var ?


    --R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 23:43:18 -->-> Daha önceki mesaj 22:01:19 --

    Yokmu dostlar yardımcı olabilecek?
  • 25-12-2013, 00:24:39
    #4
    Linkleri manuelmi ekleyecekseniniz yine wordpress panelden mi?

    Eğer bu menüyü olduğu gibi eklemek istiyorsanız

    header.php açın ve
    temanızın konumuna göre <body> tagının başladığı yerin altında bir yere yerleştirmeniz gerek.

    Yine bu menüyü wordpress ten yönetmek istiyorsanız header.php de menünün gözükmesini istediğin yere yerleştirip aşşağıdaki kodları ekleyin


    <div class="menu">
           <ul>
              <li>
    <?php wp_nav_menu( array( 'theme_location' => 'ozelmenu' ) ); ?>
    </li>
          </ul>
       </div>

    functions.php dosyasına da aşşağıdaki kodları eklemen gerekmektedir.:


    register_nav_menu( 'ozelmenu', 'Ozel Menu');

    son olarak wordpress menü yönetiminden oluşturduğunuz menünün konumunu belirleyin.