Created tabs to be selected in "Show in What Locations?"

This topic contains 13 replies, has 5 voices, and was last updated by  Tony Diaz 7 years, 6 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #323593

    Tony Diaz
    Expired Member
    Post count: 13

    I got this … easy peasy.

    https://wpgeodirectory.com/add-a-new-tab-in-the-listing-detail-page/

    But how do I custom fields to show on that tab, to be able to select that tab from the custom field editor.

    #323747

    Kor
    Moderator
    Post count: 16516

    Hi Tony,

    That’s exactly how you do that. If it’s not working for you, could you please send us a login credential so that we could check on it? Remember to set as private reply.

    Thanks!

    #323858

    Nasiot Genís
    Buyer
    Post count: 26

    Hello

    I think I need the same feature. I’ve created a new tab using the code from the blog (https://wpgeodirectory.com/add-a-new-tab-in-the-listing-detail-page/) but I don’t know how to insert my custom fields into that tab.

    For exemple, I want a tab called ‘Prices’ and put the custom fields Price1, Price2 and Price3 into this tab.

    Thanks

    #323931

    Tony Diaz
    Expired Member
    Post count: 13
    This reply has been marked as private.
    #324007

    Guust
    Moderator
    Post count: 29970

    That article is only in case you want to add data from ANOTHER plugin etc, NOT if you want to add GD custom fields.

    See https://wpgeodirectory.com/docs/core-place-settings/#fieldset

    So create a fieldset and custom fields, and drag and drop the custom fields under the fieldset in the order you want to display them.

    #324014

    Tony Diaz
    Expired Member
    Post count: 13

    Are we saying then, that it is -not- possible to add GD custom fields to a user defined tab, selectable from a listing page?

    If it’s not possible to put fields in a user defined tab, just static text then I see that ability as pretty limited.

    That is what I asked and where my screenshot is from. I didn’t say anything about fieldsets which are just banners for sections of custom fields.

    #324122

    Guust
    Moderator
    Post count: 29970

    Please review the link I posted: https://wpgeodirectory.com/docs/core-place-settings/#fieldset

    If you select Details page own tab at the Show in what locations? selections, then a new tab will be created for the custom fields ordered under this fieldset, and which also have Details page own tab selected.

    See images

    #324129

    Tony Diaz
    Expired Member
    Post count: 13

    So I need to use the Fieldset to group tab contents and can not display that custom field in more than one user created tab?

    Fieldset A
    Item 9
    Item D
    Item C

    Fieldset B
    Item 8
    Item 7
    Item 1

    I want Item 8 and Item D in a tab called “Details”, but both of them are in other fieldsets that may or may not have a tab already.

    I want to show all the fields on “More Info” and select ones separately, in a summary form. A lessor detailed page that has something from more than one fieldset. They can select a summary view or a detailed view.

    #324133

    Guust
    Moderator
    Post count: 29970

    If you want a field in “more info” and a “fieldset”, select “More info tab” and “Details page own tab:” in “Show in what locations”.
    See https://wpgeodirectory.com/docs/core-place-settings/#show

    A custom field cannot be in two custom fieldsets, but can be in “more info” and one custom field set.

    #324165

    Tony Diaz
    Expired Member
    Post count: 13

    …and as best I can tell, there are shortcodes associated with custom fields?

    (Therefore taking advantage of shortcodes and tabs)

    #324218

    Guust
    Moderator
    Post count: 29970

    Custom fields are not available as shortcodes.
    Can you explain what you mean with “shortcodes associated with custom fields”?

    Here are most of the shortcodes available: https://wpgeodirectory.com/docs/?post_type=post&s=shortcodes&cat=0

    #324287

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    if you add the new tab via php, you need to add custom fields via PHP too.

    You can display each custom field like this:

    
    
    
    global $post;
    $custom_field_value1 = $post -> geodir_yourcustomfield;
    echo $custom_field_value1;

    If you search in the forum you’ll find several examples.

    Thanks

    #324422

    Nasiot Genís
    Buyer
    Post count: 26

    Hi Paolo

    This code is perfect for me!!

    Thanks

    #324443

    Tony Diaz
    Expired Member
    Post count: 13

    Great, that does the job. Just what I was looking for.

    No clue why php just totally escaped my mind, even though I used that for the tab itself.

    Thanks!

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

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

Open Support Ticket