Вила лимон Градина

ΕλληνικάEnglishРусскийБългарскиCрпски језикDeutschItaliano
Меню
  • Начало
  • Вила
  • ΔΩΜΑΤΙΑ
    • Двойна стая с изглед към градината
    • Тройна стая с изглед към градината
    • Фамилно студио с градински изглед
  • Удобства
  • Резервация
  • Информация
  • Снимки
  • Контакт

Работи с мощен върховен родител тема

Преглед: Начало » Работи с мощен върховен родител тема
Преглед: Начало » Работи с мощен върховен родител тема

Работи с мощен върховен родител тема

администратор 21 Декември 2015 Отговори

Supreme is a child theme which works on top of our Supreme parent theme which also powers our other recent themes

With 3.0 освобождаване, WordPress е въвела нов потребителски интерфейс за управление на навигационни менюта, което просто означава, че ще получите нова страница с някои инструменти, за да ви помогне да добавите, Изтриване, и организира връзки.

За да използвате тази функция, първо трябва да го активирате. Без активизирам, вашето меню управление страница ще покаже нищо, но грешка.
Ако това е в момента неактивни, във вашия WordPress администрация панел, отидете на външния вид > менюта, за да видите грешка.

Как да активирате WordPress 3.0 Menu Management

Add the following code to the functions.php file of your theme.
[PHP]Ако (function_exists("add_theme_support")) {
add_theme_support('менюта');
}
[/PHP]
Докато add_theme_support('менюта'); достатъчно е да активирате страницата на управление на менюто, Допълнителният код около това необходимо линия уверява, ако по-късно или по-ранни версии на WordPress не разполага с тази функция, тогава просто ще направи нищо и причиняват няма грешка.

Какво означава кода по-горе:

The code above simply means if the Add Theme Support function exists, use that function to add Menus feature. Ако тя не съществува, не се прави нищо.

Step by Step

  1. Open theme folder and find functions.php.
  2. Отворено functions.php, използвайки Notepad или текстов редактор по ваш избор.
  3. Копирайте и поставете кода по-горе.
  4. File > Save functions.php

Where to place the code

If the functions.php file of your theme is messy or you don’t really know where to place the code, към края на functions.php и поставете този код преди:
[PHP]?>[/PHP]
Въпросителен знак незабавно стрелка надясно маркира края на набор от кодове. Последният комбинация от въпросителна и дясна стрелка във файла се отбелязва края на файла. Обикновено, Ако добавяте код точно преди края на файла, Вие няма да има проблем.

В редките случай, че вашата тема има functions.php файл, но тя е празна, Копирайте и поставете следния код:
[PHP]<?PHP
Ако (function_exists("add_theme_support")) {
add_theme_support('менюта');
}
?>[/PHP]
Този набор от кодове е само малко по-различно от това, което първо ви получиха. Допълнителните
[PHP]<?PHP[/PHP]
and
[PHP]?>[/PHP]
в началото и края на този набор от кодове означава започне PHP и край в PHP.

Може да затворите functions.php. За останалата част на този урок, Нямате нужда от него. Now you’ve activated the Menu Management feature or user interface, here’s what it looks like:

Using Menu Management User Interface

If you use wp_nav_menu() in theme template files to display the menu, by default, it will list only links with a Page attached to it. But, what if you wanted to add custom external links without creating a new page just to point to it? For example, adding a Twitter link to your site’s main menu. Here’s how.

First, create a custom menu because WordPress will not allow you to add, Изтриване, or re-arrange links without at least having one custom menu. Name your menu then save it. For this tutorial, my first custom menu is named, ‘first.’

After creating the custom menu, you have several options on Menu Management page to add links. For example, you can simply check the boxes next to the Pages and Categories you want to add then click the Add to Menu бутон. You can also add custom links and here’s what it looks like:
Don’t forget to click the Save Menu button after adding new links.

How to Display Custom Menu

Like I mentioned before, wp_nav_menu() by default displays your list of links based on what Pages you have. It doesn’t display custom menu links. To display the custom menu wherever you want it to show up, copy and paste the following:
[PHP]<?php wp_nav_menu(‘menu=first’); ?>[/PHP]
Replace ‘first’ with the name of your menu.

Какво означава кода по-горе:

  • Start PHP
  • Use wp_nav_menu() to display menu
  • The custom menu I want to use is ‘first.’
  • End PHP

In whichever file you’re pasting it in, save the file. Upload this file to the theme folder on your server if you’re not directly editing it through the WordPress administration panel.

I created a blank theme just for this tutorial. Here’s what it looks like for me after putting the code above in the index.php file of my blank theme.

If you right click on the page currently displaying your menu and go to View Source, you get to see what this menu looks like under the hood. Here’s what it looks like for me:
[PHP]<div class="menu-first-container">
<ul id="menu-first" class="menu">
<li id="menu-item-4" class="menu-item menu-item-type-custom"><a href="http://son">son</a>
<ul class="sub-menu">
<li id="menu-item-6" class="menu-item menu-item-type-custom"><a href="http://grandchild">grand child</a></li>
</ul>
</li>
<li id="menu-item-5" class="menu-item menu-item-type-custom"><a href="http://daughter">daughter</a></li>
</ul>
</div>
[/PHP]
Wherever you see ‘first’ in the set of codes above, you know it’s there only because I named the custom menu ‘first.’

Display Multiple Custom Menus

To do that, you have to first create the second menu. Here’s my second menu, which is conveniently named, ‘second.’ And, I’ve added two links under the second menu.
To display the second menu, duplicate code for the first menu and change menu=first to menu=second. If you named your second menu, ‘submenu,’ then change menu=first to menu=submenu. Here’s the entire code:
[PHP]<?php wp_nav_menu(‘menu=second’); ?>[/PHP]

Differentiating Custom Menus and Customizing Them

There are several ways to differentiate and customize custom menus. The most obvious one is using different names for first and second menus. The less obvious ways are customizing container_class, container_id, and menu_class. For example:
[PHP]wp_nav_menu(‘menu=first&amp;menu_class=my-main-menu’);[/PHP]
Under the hood, by adding menu_class=my-main-menu using the ampersand sign (&), my menu list changes from:
[PHP]<ul id="menu-first" class="menu">[/PHP]
to:
[PHP]<ul id="menu-first" class="my-main-menu">[/PHP]
If you want to customize the container_class along with menu_class, here’s how:
[PHP]wp_nav_menu(‘menu=first&amp;menu_class=my-main-menu&amp;container_class=container-name-goes-here’);[/PHP]
As you can see, to add another customizable option to the menu, you simply use the ampersand sign, the option you’re customizing, and the value of that option, which can be any string of texts of your choosing. After you’ve added the code, save the file, refresh the web page, and check under the hood by choosing View Source to see the changes made.

For a list of options you can customize or assign values to, go to wp_nav_menu at the WordPress Codex.

Пила под: Блог, Функции, Новини и етикет: Awesome
← Предишна Next →

Карта

Форма за контакт

Твоето име (необходими)

Във вашата електронна поща (необходими)

Тема

Вашето съобщение

Препоръки

Хубава услуга!фантастична среда от собствениците!бляскавите хора!Приятен местоположение!определено ще xanaprotimisoyme!нашите КСР нас незабравимо! - Мария Най-добрите релаксация. идеално място за релаксация и са идеални за спокойствието на. Много красива градина с лимонови дървета. Exipiretiko и приятелски настроен персонал. - Джон Много добър хотел , собствениците на хотела са много полезни и приятелски . Стаята чиста с основите, че едно нужди. В хубаво място и тихо - Димитриос Много добро местоположение. В центъра. 2"минути пеш от центъра. 5"от плажа. Просторна стая. Чисти. Хубава гледка. Заобиколен от дървета-природа. Тихо - Vaggelis Стаята е просторна, удобни и чисти. Много удобен кухненски. Балкона е идеално за отдих и храна или напитка. Всички магазини са били много близки и на плажа, докато в 2 КЛМ за Гларокавос бряг е това е перфектно! Персоналът беше много любезен внимателно &. - Кристина е близо до центъра на Peyochwrioy!Ница среда,спокойствие!МРЕЖАТА,ΠΟΛΥ ΚΑΛΗ ΕΞΥΠΗΡΕΤΗΣΗ ΑΠΟ ΤΟ ΠΡΟΣΩΠΙΚΟ!ΘΑ ΤΟ ΠΡΟΤΕΙΝΑ ΚΑΙ ΣΕ ΦΙΛΟΥΣ!!ΚΑΙΙ ΕΓΩ ΘΑ ΤΟ ΠΡΟΤΕΙΜΗΣΩ ΞΑΝΑ! - Марк
Още отзиви и Бъз»

Последни новини

  • Закачете се на Tinder
    6 Февруари 2023 в 4:03 PM / 0 Коментар
  • Автоматични актуализации
    21 Декември 2015 в 4:49 PM / 0 Коментар

© 2015 Вила лимон Градина. Всички права запазени.

Влизане

Забравили сте паролата си?

Забравена парола

Регистрирането е забранено на този сайт.

Вече имаш акаунт? Влизане