Address layout on preview page

This topic contains 4 replies, has 2 voices, and was last updated by  Paolo 7 years, 7 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #287850

    vicki
    Buyer
    Post count: 76

    I used your code from this page

    https://wpgeodirectory.com/docs/changing-the-layout-of-addresses/

    to change the layout of the address, but recently noticed that the layout was not correct on the listing preview page.

    I removed

    if(!$preview)

    from the code and all looks fine now. I presume this was just an oversight on your part but thought I should mention it so that you can either correct that code example or let me know of any reason the conditional should stay. Thanks!

    #287872

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    I just double checked and I don’t really see a good reason to exclude the preview page.

    Thanks for spotting that!

    #287874

    Paolo
    Site Admin
    Post count: 31206

    Actually Stiofan says that will work only on edit of an existing listing, but In the preview page of a new listing, it will not work. That’s because in a new listing the data is still not saved in the database.

    Can you please double check and confirm?

    #287928

    vicki
    Buyer
    Post count: 76

    Hmm, just checked with a new listing and the formatting was fine on the preview page without if(!$preview).

    #287962

    Paolo
    Site Admin
    Post count: 31206

    Ok kool, then in that case it is not needed 🙂

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket