Add field name before value in tabs

This topic contains 10 replies, has 2 voices, and was last updated by  Alex Rollin 6 years ago.

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

Open Support Ticket
  • Author
    Posts
  • #452678

    Andrew
    Expired Member
    Post count: 197

    Hi,

    I’ve created a custom tab “Accessibility Attributes” which includes a set of different fields. I’d like to include the fields names before the actual field values so that they have some context – is that possible?

    For example, before the ‘Yes’ value underneath ‘General’, I’d like to include the title: “Email booking option:” which is the actual name of the field.

    See attached images.

    Thanks,
    Andrew

    #452709

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    The “Field label” from the custom field settings will be included if the field is a ‘subfield’ inside the tab. To make that work use the fieldset to create the tab. If this isn’t working, we can take a look at your site to find the problem.

    You can also try to use the shortcode option (in the tabs UI) to add the fields using the gd_post_meta shortcode.

    #452725

    Andrew
    Expired Member
    Post count: 197

    The only issue here is that these fields that I’d like the labels to show are like sub-subfields – as you can see in screenshot_1.png attached in my original post.

    I tried using the shortcode however I’d prefer it was shown as “label: value” (rather than a new line between the ‘label’ and ‘value’).

    I’ll include my details in a private reply below –

    #452726

    Andrew
    Expired Member
    Post count: 197
    This reply has been marked as private.
    #452742

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    the GD plugins are out of date.

    Please bring them up to date and then we can take another look. The shortcode field on the tabs UI is not behaving correctly. Once you update we can check again.

    It should look like the attached. Did you try gd_post_meta shortcodes in the detail page template then? If you want to show it in tabs then you would use the shortcode field on the tabs UI.

    In theory the output should be inline. Once you update we can see if these issues persist.

    Thanks

    #452810

    Andrew
    Expired Member
    Post count: 197

    Hi Alex,

    Thanks for the heads up, will stay on top of that from now on.

    I tried using the shortcode field, however it’s still not displaying inline (see attached image). I haven’t tried the gd_post_meta shortcodes in the detail page template yet.

    Thanks for your help,
    Andrew

    #452853

    Alex Rollin
    Moderator
    Post count: 27815

    I am seeing custom CSS on your site blocking the display:

    
    
    
    .geodir_post_meta_title {
        display: none;
    }
    

    Remove that and you should see the default output working as expected (as a subfield in a tab).

    Some fields do have a break, like text areas, showing the value on the next line, but text fields are inline.

    #452946

    Andrew
    Expired Member
    Post count: 197

    Ah right – my bad, that’s sorted. Thanks for that 🙂

    One more thing – is there an easy way to remove the grey horizontal divider lines? (see attached image)

    Thanks!

    #452971

    Alex Rollin
    Moderator
    Post count: 27815
    #453185

    Andrew
    Expired Member
    Post count: 197

    Hi Alex, thanks for that although it only explains how to remove the lines in the sidebar, not necessarily those lines that separate fields on the place details page. What’s also odd is I can’t seem to find the lines in the CSS either, so I can’t simply “display: none” them … any ideas?

    #453207

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    I have written some additional CSS to zero out the gd styles for fields in several places.

    https://wpgeodirectory.com/docs-v2/faq/common-examples/#fields

    Let us know how that works for you.

Viewing 11 posts - 1 through 11 (of 11 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