• Resolved daddiofaddio

    (@daddiofaddio)


    Making fields/tabs only visible to listing owners/authors. I am aware of the general conditional fields options. However, I have been trying to hide specific tab(s) or field(s) so that they’re only viewable to the listing owner. I’m sure I’m missing it, but haven’t been able to find an option using conditional fields or the short code generator to make this happen.

    Rendering of shortcode content in fields which don’t have the specific option to render media, etc. Example: Let’s say I have a multiselect field with a key of “badge” with the following sample options/values:

      [wpfd_single_file id=”233″] : Label1
      [wpfd_single_file id=”238″] : Label2

      I am able to display the properly-rendered shortcode for the selected labels/options in a separate tab with a geodirectory shortcode like this: [gd_post_meta key=”badge” show=”value-raw” font_size=”0″]

      However, if I simply create a tab for the “badge” field itself, only the labels display in the tab (“Label1” etc.), not the actual values/rendered shortcode. Is it possible to show shortcodes in a field directly in it’s corresponding tab without having to create a separate shortcode tab?

      Dynamically populating values in shortcode and rendering in front end. Example: I would like to have a multiselect value populate another field or tab value dynamically. Specifically, building on the multiselect example above, would it be possible to have something like this:

        Multiselect field
        Value : Label = 233 : Label1
        Value : Label = 238 : Label2

        Then, there would be another separate field or tab that would have a default value of “[wpfd_single_file id='{ }’]”. When a user selected “Label1” the value of “233” is entered into the default value and the short code is rendered dynamically on the front end. I have used Directories Pro with other directory sites and it has this option, so I know it’s possible.

        Thanks for your help!

      Viewing 4 replies - 1 through 4 (of 4 total)
      • Plugin Author Stiofan

        (@stiofansisland)

        Hi @daddiofaddio,

        What theme are you using? If you are using one of our new themes it has more condtionals built in.

        1. Making fields/tabs only visible to listing owners/authors. – as mentioned above, if you are using one of our new themes this is built-in, however, i do like that idea and i’ll add a task for this to be added to our dynamic content element. https://github.com/AyeCode/geodirectory/issues/2630
        2. If using tabs with a few fields your best bet is to use the shortcode tab, this will only dispaly if there is content, so you could add multiple fields and it will only show it there is output.
          You should be able to control the output easier also. And if you need to add custom labels you can wrap the whole thing in a dyanmic content shortcode, so for this you have have shortcodes inside the synamic content shortcode.
        3. This can technically could be done with a few dyanic content shortcodes (depending on the amount of avaialble values) It could also be done via a filter. (let me know if you need this explaind more).

        Hopefully i unerstood your points, sometimes its best to describe what you need it to do rather than how you think you should do it, and i can describe the best way to achive the end goal ??

        Thanks,

        Stiofan

        Thread Starter daddiofaddio

        (@daddiofaddio)

        Thank you for the quick response!

        I use a custom theme built on an html directory template, found here: https://themes.getbootstrap.com/product/directory-directory-listing-bootstrap-4-theme/

        I will check out your themes.

        As for what I’m trying to accomplish:

        I host a professional listings/membership directory where members select a subscription package during signup. As part of the different subscription levels offered, members choose different digital badges at the time of registration. After successfully registering, the members then have access to download the badges for the life the the subscription. I use the WP File Download plugin as the digital downloads manager. In my current setup using another directory plugin, I created a custom multiselect field and set it up as described in the last part of my post above (another separate field that has default value of the WPFD shortcode “[wpfd_single_file id='{ }’]”. When the options are selected, they are entered into the default value and the short codes are rendered dynamically on the profile details page in a separate tab). Although WPFD has user-level content restriction options for its native display options, I can’t apply those options for the directory since the files are dynamically selected and I’m using the same file for multiple users. The content restrictions of the directory plugin, however, separately allows for user-level conditional options, and I have set the option to allow for conditional visibility of the tab only for that member. I would like to accomplish the same with GeoDirectory.

        As a side note, many of the professionals in my directory are older and not computer savvy at all. Initially, despite multiple thorough FAQs about downloading the digital files and a very obvious menu link to download the files in their member dashboard/Woocommerce My Account page, etc., the single most common email question my support team still received from members was asking where they could find their badges. I found this setup crucial to stop all the support requests. I could see the functionality also applying to a number of different user cases, so thank you for adding it!

        Plugin Author Stiofan

        (@stiofansisland)

        Ok, thanks for the info. As mentioned above, the release later today will have user content restriction in the dynamic content shortcode. This should allow you to do what you want by limiting it to the listing owner and wrapping your other shortcode in that dyanmic content call.

        If your not sure what i mean, just let me know and i can explain further.

        Thanks,

        Stiofan

        Thread Starter daddiofaddio

        (@daddiofaddio)

        Awesome, thanks for including the feature! Works great!!

      Viewing 4 replies - 1 through 4 (of 4 total)
      • You must be logged in to reply to this topic.