وردپرس نسخه 3,0+مرجع توابع مورد استفاده در کد نویسی پوسته
Title Tags
Single Cat Titlesingle_cat_title();
Displays or returns the category title for the current page. For pages displaying WordPress tags rather than categories (e.g. "/tag/geek") the name of the tag is displayed instead of the category. Can be used only outside The Loop.
<?php single_cat_title($prefix, $display); ?>
$prefix
String
(Optional) Text to output before the title. Default: none.
$display
Boolean
(Optional) Should the title be displayed (True) or returned for use in PHP (False). Default: True.
Single Month Titlesingle_month_title();
Displays or returns the month and year title for the current page. This tag only works when the m or archive month argument has been passed by WordPress to the current page (this occurs when viewing a monthly archive page). Note: This tag works only on date archive pages, not on category templates or others. It does not support placing the separator after the title, but by leaving the prefix parameter empty, you can set the title separator manually. The prefix does not automatically place a space between the prefix, so if there should be a space, the parameter value will need to have it at the end.
<?php single_month_title($prefix, $display); ?>
$prefix
String
(Optional) Text to output before the title. Default: none.
$display
Boolean
(Optional) Should the title be displayed (True) or returned for use in PHP (False). Default: True.
Single Post Titlesingle_post_title();
Displays or returns the title of the post when on a single post page (permalink page). This tag can be useful for displaying post titles outside The Loop.
<?php single_post_title($prefix, $display); ?>
$prefix
String
(Optional) Text to output before the title. Default: none.
$display
Boolean
(Optional) Should the title be displayed (True) or returned for use in PHP (False). Default: True.
Single Tag Titlesingle_tag_title();
Displays or returns the tag title for the current page.
<?php single_tag_title($prefix, $display); ?>
$prefix
String
(Optional) Text to output before the title. Default: none.
$display
Boolean
(Optional) Should the title be displayed (True) or returned for use in PHP (False). Default: True.
The Search Querythe_search_query();
Displays the search query for the current request, if a search was made. This function can be used safely within HTML attributes (as in the "search box" example, below).
<?php the_search_query(); ?>
No parameters.
WP Titlewp_title();
Displays or returns the title of the page. A separator string can be defined, and beginning with Version 2.5, that separator can be designated to print before or after the title of the page. This tag can be used anywhere within a template as long as it's outside The Loop on the main page, though is typically used in the <title> element for the head of a page.
<?php wp_title($sep, $echo, $seplocation); ?>
$sep
String
(Optional) Text to display before or after of the post title (i.e. the separator). By default (if sep is blank) then the » (») symbol will be placed before or after (specified by the seplocation) the post title. Default: » (»).
$echo
Boolean
(Optional) Echo the title (True) or return the title for use as a PHP string (False). Default: True.
$seplocation
String
(Optional) Introduced with Version 2.5, this parameter defines the location of where the sep string prints in relation to the title of the post. For all values except 'right', the sep value is placed in front of (to the left of) the post title. If the value of seplocation is 'right' then the sep string will be appended after the post title. Default: none.