Support » Plugin: WPAdverts - Classifieds Plugin » Preview the temp advert title

  • Resolved Mugur


    Hi Greg,

    Is there a way to show the temporary title of the advert in the preview page.
    I already create a new preview template but I do not know how to find the php code for the title in the sameway like you show the content.
    <?php echo $post_title ?>
    <?php echo $post_content ?>


Viewing 1 replies (of 1 total)
  • Plugin Author Greg Winiarski


    i understand you are adding the title in add-preview.php template file? If so then you can display there the title with the code below

    <?php echo esc_html( get_post( $post_id )->post_title ) ) ?>

    or just

    <?php echo esc_html( get_the_title( $post_id ) ) ?>
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.