Pre-populate a custom field on Add listing

This topic contains 9 replies, has 4 voices, and was last updated by  Mark Cuddy 6 years, 11 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #427106

    Mark Cuddy
    Free User
    Post count: 52

    Hi,
    I’d like to prepopulate a field on add listing with the field data from a Buddypress profile field, is this possible?

    Thanks

    #427112

    Alex Rollin
    Moderator
    Post count: 27815

    We don’t have any settings available for that.

    Can you give an example of what you would like to do? Then maybe we can point you in the right direction.

    Would this happen on the add/edit listing page, perhaps on submit?

    #427113

    Mark Cuddy
    Free User
    Post count: 52

    On add/edit listing and I can hide the field (like using a default value as I’m doing below)

    On a second note I’m prepopulating a field on the form with the shortcode [gd_listings post_author=”current”] but on the tab to show more listings by this person I get No listings found which match your selection.

    Thanks in advance

    #427137

    Paolo
    Site Admin
    Post count: 31211

    Please see doc about this: https://wpgeodirectory.com/docs/core-shortcodes/#listings

    post_author – Filter by current_user, current_author or ID (default = unfiltered)

    post_author=”current_user” will filter the listings by author id of the logged in user
    post_author=”current_author” will filter the listings by author id of current viewing post/listing
    [Only for Detail pages: this option will show other listings of the same author on the detail page only]
    [also works on Author pages, but only if you do not use any other plugin that replaces the Author page (for example UsersWP)]
    post_author=”11″ will filter the listings by author id = 11
    post_author=” “ If left empty, all listings will be shown

    Thanks

    #427220

    Mark Cuddy
    Free User
    Post count: 52

    Thanks

    #427222

    Mark Cuddy
    Free User
    Post count: 52

    Spoke too soon, the field is populated with [gd_listings post_author=”current_author”]

    but still getting “No listings found which match your selection.”

    https://virtual-i-venues.com/places/united-kingdom/shetland-islands/quendale/automotive/aaa-1/

    #427225

    Kiran
    Moderator
    Post count: 7069

    Hi Mark,

    Please post admin credentials in private reply, so we can take a look.

    Kiran

    #427226

    Mark Cuddy
    Free User
    Post count: 52
    This reply has been marked as private.
    #427234

    Kiran
    Moderator
    Post count: 7069

    Hi Mark,

    You have incorrect double quote(“) in shortcode. It seems you have copy pasted shortcode.
    Correct:

    [gd_listings post_author="current_author"]

    Incorrect:

    [gd_listings post_author=”current_author”]

    I have fixed and now tab showing listings fine.

    Kiran

    #427250

    Mark Cuddy
    Free User
    Post count: 52

    Thanks a lot!!!

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

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

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount