How to display multiselected values as icons

This topic contains 7 replies, has 3 voices, and was last updated by  Paolo 8 years, 9 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #196394

    Mario
    Expired Member
    Post count: 58

    I am struggling to show multiselected values with icons.
    1. User should select spoken language with a multiselect-element (german, spanish, english, french, netherlands). Multiselect is named ‘nations’.
    2. The result should be displayed with the suitable icon (in listings). See screens.

    It is really close to https://wpgeodirectory.com/docs/custom-field-examples/, but i just can handle with class ‘geodir_nations’.
    Dev-Page: http://stage.radsport-spanien.de/de/radcamps/
    Any hint is very welcome, thank you.

    #196523

    Guust
    Moderator
    Post count: 29970

    You will need to create a custom field for each language, otherwise you cannot use the CSS for a flag icon.
    You need to create multiple custom field like the “pool” example at https://wpgeodirectory.com/docs/custom-field-examples/#special-icons

    #197183

    Mario
    Expired Member
    Post count: 58

    ok. Thanks.

    #197184

    Guust
    Moderator
    Post count: 29970

    You’re welcome 🙂

    #200665

    Mario
    Expired Member
    Post count: 58

    i managed it, but not without modifying custom_field_functions.php.

    #200979

    Paolo
    Site Admin
    Post count: 31211

    just FYI, modifying core files will force you to either stop updating or re-apply your mod every time we update the plugin.

    Please keep that in mind.

    Thanks

    #200987

    Mario
    Expired Member
    Post count: 58

    yes, unfortunately – only this was obviously my option.
    But perhaps you will extend this in core-file too. Would be nics.
    Just every value in multiselect-fields gets a own unique css-class. Then the values are modifiable with css-selectors easily like in this documentation: https://wpgeodirectory.com/docs/custom-field-examples/#special-icons

    #200993

    Paolo
    Site Admin
    Post count: 31211

    I asked to Stiofan to check if it’s possible to add it from next version.

    If you provide an example of how you modified the code and it is acceptable for our standards, we may decide to use it directly.

    If you wish you can do that directly via Github with pull requests.

    Let us know,

    Thanks

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