Is featured custom field does not apply the standard value

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

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

Open Support Ticket
  • Author
    Posts
  • #527506

    directoryfan
    Expired Member
    Post count: 157

    Hello Support Team,

    for some reason the featured custom field does not apply the selected standard value.

    The field is active, the standard value is selected “Unchecked”, the field “Admin only edit” is checked too. But when a user is submitting or editing a listing, then the field Is featured is allays saved with the value “checked”. This happens with both CPTs places and events, field settings are the same.

    Is this the normal behavior or a bug or something with my site (after the v2 update; WP and all plugins are in last versions)?

    Thank you a lot for any advice to this!

    Greetings, Marius

    #527507

    directoryfan
    Expired Member
    Post count: 157
    This reply has been marked as private.
    #527543

    Alex Rollin
    Moderator
    Post count: 27815

    The featured field is ‘automated’ and will be set based on the package. If included, checked. If excluded, unchecked.

    https://wpgeodirectory.com/docs-v2/places/custom/#featured

    #527551

    directoryfan
    Expired Member
    Post count: 157

    Thank you Alex for your answer!

    I see, I have excluded it from the standard free package, and now is completely excluded from the Add listing form too, even if the field is still active and with the option “Admin only edit” checked.

    Does this mean, that I can not have the field Is featured as unchecked by default and just by admin editable and part of the Add listing form?

    Thanks again!

    #527584

    Alex Rollin
    Moderator
    Post count: 27815

    Regardless of the admin only status the field will be set based on the packages.

    The developers are considering a change, a manual override, and may add something like it to future versions.

    #527614

    directoryfan
    Expired Member
    Post count: 157

    Thank you Alex for your help!

    In this case, the admin or the moderator of the site has to reset this field to “unchecked” after each listing submit and each listing update. This is not so optimal.

    Is there maybe a workaround with another custom field? What about if I add another checkbox custom field to the Add listing form? What I want to achieve:

    1. A custom field like a checkbox with the standard value “unchecked”.
    2. This field should not be visible to the users, just for the admin. I suppose the option “Admin only edit” should be enough for this or do I am wrong, do I misunderstand the use of this option?
    3. The field should be used with the free package.
    4. The field should be used for sorting.
    5. The field should be outputted on the listing as a badge.

    Is this possible with GD? (I’m not sure if free package and “Admin only edit” are compatible options)

    #527616

    Alex Rollin
    Moderator
    Post count: 27815

    There isn’t a workaround with the featured field.

    If you want an automated solution then the featured field is the only one that works like that.

    You can certainly do 1-5 with another checkbox, yes. For GD Listings, you will want to setup a sort in the CPT and then use that sort in GD Listings.

    #527617

    directoryfan
    Expired Member
    Post count: 157

    Thank you Alex! What I do not understand is the relation between:
    1. checkbox with standard value “unchecked”
    2. checkbox for the “free package”
    3. checkbox with “Admin only edit” option

    Are the 3 options compatible? In the case of the Is featured field they are not, because if the field is in the free package, then the standard value is always “checked”. Is this the case for all checkbox fields? Is this how it should be by design of GD?

    #527624

    directoryfan
    Expired Member
    Post count: 157

    I just did it and it works. I can replace the featured checkbox with another custom checkbox with the standard value “unchecked” in the “free package” and visible just for “Admin only edit” and with the option “Include this field in sorting options” and made it as standard sorting.

    And it works! This is great.

    I have used the following shortcodes for the checkbox with the key “empfehlung”:

    On the archive item page:

    For the top left angle:

    [gd_archive_item_section type='open' position='left']
    [gd_post_badge key='empfehlung' condition='is_not_empty' badge='EMPFEHLUNG' bg_color='#ed6d62' txt_color='#ffffff' css_class='gd-ab-top-left-angle gd-badge-shadow']
    [gd_post_images type='image' ajax_load='true' link_to='post' show_logo='true']
    [gd_archive_item_section type='close' position='left']

    and for the Badge under the title:

    [gd_post_badge key='empfehlung' condition='is_not_empty' icon_class='fas fa-grin-hearts' badge='Mach mit!' bg_color='#ed6d62' txt_color='#ffffff' alignment='left']

    On the detail page:

    [gd_post_badge key='empfehlung' condition='is_not_empty' icon_class='fas fa-grin-hearts' badge='Mach mit!' bg_color='#ed6d62' txt_color='#ffffff' alignment='left']

    And on the GD listings:

    [gd_listings title="Gemeinschaftsevents" event_type="upcoming" post_type="gd_event" related_to="default_category" post_limit="2" add_location_filter="1" with_pics_only="1" use_viewing_post_type="1" sort_by="empfehlung_desc" title_tag="h2" layout="2" view_all_link="1" with_pagination="1" bottom_pagination="1" hide_if_empty="1" category="24"]
    #527625

    directoryfan
    Expired Member
    Post count: 157

    So this incompatibility between standard value, free package and Admin only is just for the featured field. It works with another custom checkbox field.
    Thank you Alex for your help!

    #527628

    Alex Rollin
    Moderator
    Post count: 27815

    Yes!

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