Forum Replies Created
-
AuthorPosts
-
Yasmine
ParticipantThe problematic code is:
/* Restrict dashboard access to non admin */ add_action('admin_init', 'restrict_dashboard_access'); function restrict_dashboard_access() { if (!current_user_can('manage_options')) { wp_safe_redirect(home_url()); exit; } }So dashboard access is needed to see the advanced search field and favourite posts (same issue as my other ticket: https://support.metabox.io/topic/user-permissions/ )
With manage_options granted, it works.
I want to limit backend access, but I want this to work. What can I do?
Yasmine
ParticipantI think it is something to do with my own settings. I disabled code in my functions.php and working again, sorry for the unneeded ticket
April 25, 2024 at 12:46 AM in reply to: ✅post type with select_advanced broken in latest version - works in previous one #45300Yasmine
ParticipantSomething to do with user roles.. will start another ticket
April 25, 2024 at 12:33 AM in reply to: ✅post type with select_advanced broken in latest version - works in previous one #45299Yasmine
ParticipantAnyone fix this? Stefan, I have the same
Yasmine
ParticipantI ask because I can save posts as an administrator, but I cannot when logged in with the following permissions:
create_posts
edit_posts
edit_private_posts
edit_published_posts
publish_posts
read
read_form
read_private_pages
read_private_posts
read_submission
upload_filesYasmine
ParticipantIncredible! Didn't spot that, thanks
Yasmine
ParticipantThank you for your reply!
I just tried to input it via a shortcode and it worked - so something to do with the bricks builder editor. Thank you!
Yasmine
ParticipantThanks Peter - any updates?
Yasmine
ParticipantAnd forgot to mention, before I tried with the hidden, I tried with
'visible' => [ 'when' => [ ['academicoutput', 'in', [9212, 13304]], ['current_selection', '=', 'ref_p13-2'], ], 'relation' => 'and', ],But maybe it doesn't work as the current_selection field updated with js on button click?
Yasmine
ParticipantAnd just double checking - you cannot add tabs within a group field type? I am forced to use classes to manage visibility which I think why there is problematic CSS being applied
Yasmine
ParticipantAh they were actually conditions in a separate field group. Because I toggle it from the admin editor, whereas other fields are from the form - but both have same CPT location. Was that the reason? Do I need to create a hidden field with their value on the form?
Yasmine
ParticipantEvery time I finally give up and reach out for support, after sending the support ticket I instantly figure it out. It was because of this - post_id="current"- in the shortcode, right?
I was wanting to use the same form to create new and for editing posts later. Is that not possible?
Yasmine
Participantcheckbox_tree Hierarchical list of checkboxes which allows to select multiple items (select/deselect parent item will show/hide child items). Applied only when the taxonomy is hierarchical (like category).
Yasmine
ParticipantHi - this was never fixed. My checkbox tree with code:
[ 'name' => __( 'Country focus', 'your-text-domain' ), 'id' => $prefix . 'academiccountry_focus', 'type' => 'taxonomy', 'taxonomy' => ['country-tags'], 'field_type' => 'checkbox_tree', 'multiple' => true, 'flatten' => false, 'query_args' => [ 'orderby' => 'menu_order', 'order' => 'ASC', 'child_of' => 10152, ],Shows all the values. Not just the first parent. I want only the parent values to show, and when they are clicked then for its children to show
Yasmine
ParticipantHi,
Yes I have
'required' => true,across many fields.Understand you do not support a second button, but it is just a submit button and when it submits the validation does not work. I don't think there is anything in my button that is causing this
-
AuthorPosts