Answers for "wordprss get post type from id"

PHP
5

wordpres get_posttype

if ( get_post_type( get_the_ID() ) == 'slug_post_type' ) {
    //if is true
}
Posted by: Guest on June-17-2020
0

get post title by post id wordpress

get_post( $post_id )->post_title
Posted by: Guest on October-13-2020

Browse Popular Code Answers by Language