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

    (@gwin)

    You would need to add it in wpadverts/templates/add-preview.php file, of course this will be overwritten on WPAdverts update and you will need to redo it with each update.

    Thread Starter wasantec

    (@wasantec)

    help me? display name wpadverts/templates/single.php not working in add-preview.php

    <div class="adverts-grid-row">
            <div class="adverts-grid-col adverts-col-30">
                <span class="adverts-round-icon adverts-icon-wordpress"></span>
                <span class="adverts-row-title">title</span>
            </div>
            <div class="adverts-grid-col adverts-col-65">
               <?php esc_html_e( get_post_meta( $post_id, "post_title", true ) ) ?>
            </div>
        </div>
    Thread Starter wasantec

    (@wasantec)

    Asking for advice.

    Example code display name in to preview.

    Plugin Author Greg Winiarski

    (@gwin)

    The post_title is not a meta value but wp_post property so instead of

    <?php esc_html_e( get_post_meta( $post_id, "post_title", true ) ) ?>

    you should have

    <?php esc_html_e( get_post( $post_id )->post_title ) ?>

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How display name post_title in to preview detail the advertisement?’ is closed to new replies.