Echo a Listing's title without shortcode?

  • Chuck
    Chuck
    Newbie
     
    70 points

    Does anyone know how to echo the title of a listing in php without using the [TITLE] shortcode or the do_shortcode function?


    Chuck
    Chuck
    Newbie
     
    70 points

    Nevermind.

    $title = get_the_title($postid = get_the_ID(), ‘title’, true);
    echo $title;

    Alternatively you could use…

    $postid = get_the_ID();
    $title = get_the_title($postid, ‘title’, true);
    echo $title;


    Josh
    Josh
    Super Guru
     
    13,888 points

    Thanks for sharing Chuck :)


Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.