• Hello, I just found out that after filling the form to add a new ad, then go to Preview, it will show other information but not the “Title”.

    I thought it was the issue of my website before, just when I tried on your demo, https://demo.wpadverts.com/lite/adverts/add/

    It also has no “Title” on the preview.

    May I know is it an option on setting?

    Thank you.

    • This topic was modified 3 years, 8 months ago by wesleyli.
Viewing 1 replies (of 1 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    the preview does not display the title as the title is a part of the theme page template.

    If you want to somehow show the title on the preview page as well then you can do that by adding the code below in your theme functions.php file (or even better by creating a blank plugin and pasting it there https://wpadverts.com/blog/how-to-use-code-snippets-in-wordpress/).

    
    add_action( "adverts_tpl_single_top", function( $post_id ) {
        if( ! is_singular( 'advert' ) ) {
            echo sprintf( "<h1>%s</h1>", get_the_title( $post_id ) );
        }
    }, 1 );
    
Viewing 1 replies (of 1 total)
  • The topic ‘“Title” not display on the “Preview” page.’ is closed to new replies.