wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
get_the_title [ WordPress Function ]
| Parameter: |
|
| Gibt zurück: |
|
| Definiert in: |
|
Retrieve post title.
If the post is protected and the visitor is not an admin, then "Protected" will be displayed before the post title. If the post is private, then "Private" will be located before the post title.
Source
<?php
function get_the_title( $id = 0 ) {
$post = &get_post($id);
$title = isset($post->post_title) ? $post->post_title : '';
$id = isset($post->ID) ? $post->ID : (int) $id;
if ( !is_admin() ) {
if ( !empty($post->post_password) ) {
$protected_title_format = apply_filters('protected_title_format', __('Protected: %s'));
$title = sprintf($protected_title_format, $title);
} else if ( isset($post->post_status) && 'private' == $post->post_status ) {
$private_title_format = apply_filters('private_title_format', __('Private: %s'));
$title = sprintf($private_title_format, $title);
}
}
return apply_filters( 'the_title', $title, $id );
}
?>
Beispiele [ wp-snippets.com ]
Top Google Suchergebnisse
- get_the_title - WordPress Codex
Description. This function will return the title of a post for a given post id. If the post is protected or private, the word "Protected: " or "Private: " prepended to the ...
codex.wordpress.org - Wordpress get_the_ID() returns nothing but get_the_title() returns ...
This works within the loop: <?php $this_page_id = get_the_ID(); echo $ this_page_id ; ?> Outside of the loop: <?php $this_page_id ...
stackoverflow.com - string - Wordpress php, get_the_title() coming out empty when run ...
I'm currently working on a Wordpress site. And what the client wants is ... Can you verify the actual titles? Maybe you're pulling in a post that has ...
stackoverflow.com - get_the_title:WordPress私的マニュアル
get_the_title - タイトルを取得する. ... 説明. string get_the_title( [ int $id = 0 ] ). 投稿 データのタイトルを取得する。 パラメータ. $id. 投稿データID。省略時は0となり、現在の ...
elearn.jp
Nutzerduskussionen [ wordpress.org ]
- Smaug56 on "[Plugin auto-create categories] get_the_title returning 'Auto Draft'"
- netcs.vg on "[Plugin auto-create categories] get_the_title returning 'Auto Draft'"
- Smaug56 on "[Plugin auto-create categories] get_the_title returning 'Auto Draft'"
- Smaug56 on "[Plugin auto-create categories] get_the_title returning 'Auto Draft'"
- Oleg Dudkin on "Get_the_title returning ID only?"
- dav1dr0well2 on "Get_the_title returning ID only?"
- dav1dr0well2 on "Get_the_title returning ID only?"
- dav1dr0well2 on "Get_the_title returning ID only?"
- Oleg Dudkin on "Get_the_title returning ID only?"
- dav1dr0well2 on "Get_the_title returning ID only?"