WordPress – References / get_the..

get the title
<#?php echo get_the_title(); ?#>

next post link
<#?php next_post_link(); ?#>

previous post link
<#?php previous_post_link(); ?#>

get the category list
<#?php echo get_the_category_list(); ?#>

get the post thumbnail
<#?php echo get_the_post_thumbnail( $page->ID, ‚thumbnail’ ); ?#>

get the content
<#?php $content = get_the_content('Read more'); print $content; ?#>

the tags
<#?php the_tags('Tagged with: ',' • ','
‚); ?#>

get post custom keys
<#?php get_post_custom_keys($post_id); ?#>

get post custom values
<#?php get_post_custom_values($key, $post_id); ?#>

add post meta
<#?php add_post_meta( 68, 'my_key', 'The quick, brown fox jumped over the lazy dog.' ); ?#>

update post meta
<#?php update_post_meta(76, 'my_key', 'Steve'); ?#>

https://codex.wordpress.org/Function_Reference/

Tagi: , ,
Napisano w Prywata