Template Tags/the title attribute

Материал из WordPress Wiki

Перейти к: навигация, поиск

Содержание

Description

Displays or returns the title of the current post. It somewhat duplicates the functionality of the_title(), but provides a 'clean' version of the title by stripping HTML tags and converting certain characters (including quotes) to their character entity equivalent; it also uses query-string style parameters. This tag must be within The Loop.

Usage

%%% <?php the_title_attribute('arguments'); ?> %%%

Example

<?php the_title_attribute('before=<h3>&after=</h3>'); ?>

Parameters

before 
(string) Text to place before the title. Defaults to ''.
after 
(string) Text to place after the title. Defaults to ''.
echo 
(Boolean) Echo the title (1) or return it for use in PHP (0). Defaults to 1.

Related

See also the_title().

Шаблон:Tag Post Tags

Шаблон:Query String Tag Footer

Личные инструменты
Реклама

химчистка ковров на дому
Квартиры в Элитном доме Грюнвальд. Заречье в долине реки Сетунь