Forum Replies Created
-
AuthorPosts
-
Yasmine
ParticipantAlmost. I have a multi-step frontend form. I have one tab which asks for cloneable group fields. I am only asking you the best approach to turn the cloneable group field into pages (since it is nested I can't use tabs). Please can you share the approach you would use since I can't use tabs. Should I :
1. Use the custom html field to create divs
2. Use individual classesYasmine
ParticipantAh yes working in admin. My issue was frontend - so I will await the fix. Thanks!
Yasmine
ParticipantThanks Peter, my
save_postfires correctly - no issues with the hook not working, and the relationship update is executed (just doesn't work).I only need to fire this occasionally, the
inithook seems a little excessive. But if that's the only option..Yasmine
ParticipantTo clarify, I am facing the same issue with all plugins disabled and triggering directly from Meta Box form - [mb_user_profile_info id="new-institution"]. It creates the post, but does not create the relationship, even though it updates all the other custom fields
Yasmine
ParticipantOk so I realise it works if I save it twice. Even with plugins it works. But it needs to be saved twice?
What I am doing:
* On user edit - create a new CPT post (on a add_action('profile_update', 'create_university_from_user_data', 10, 2); hook) - this works
* After post is created - add the relationship to the user to the post (still not working)Yasmine
ParticipantHi on a save_post - no it doesn't work. On an init yes it works, but I don't really want it running on an init. Does it work for you on a save_post? What could be the issue?
All the other fields are able to update on a save_post. Just not the relationships.
Yasmine
ParticipantI can set on an admin_init - so its definitely just not working with the hook. Which hook do you recommend?
June 20, 2024 at 6:36 PM in reply to: How do I add a class to the favourite post button and icon? #45675Yasmine
ParticipantFinal request: Can you add the bookmark icon as an option to choose ?
June 20, 2024 at 6:12 PM in reply to: How do I add a class to the favourite post button and icon? #45673Yasmine
ParticipantOf course as soon as I write this I figure out its
spanJune 20, 2024 at 6:06 PM in reply to: How do I add a class to the favourite post button and icon? #45672Yasmine
ParticipantThe class is being added. I can successfully change the background colour using my custom code.
But I still cannot change the text. In the inspector, I see that the correct colour is being applied:
.research--sdg-mb, .research--sdg-mb a, .research--sdg-mb svg {
color: #00689D !important;
fill: #00689D !important;
}How do I target the text? It is not in the inspector so I can't see how the text was targeted.
June 11, 2024 at 9:01 PM in reply to: How do I add a class to the favourite post button and icon? #45635Yasmine
ParticipantHi thanks - I did try that: [mbfp-button class="research--sdg" show_count="false" add="Save for later" Icon="star" added="Saved" ]
But it still doesn't let me change the colour of the icon and text - I have some code to change the colour of certain elements depending on the blog type so I set a $custom_color to a shortcode [custom_link_color] - for all the other elements assigned theresearch--sdg - it sets them as $custom_color but it does not work for this button.
Yasmine
ParticipantI do see the $_POST array when do that. But when I try compare it:
$old_values = rwmb_meta('academicreference_group', ['object_type' => 'post'], $post_ID);
$new_values = $_POST['academicreference_group'] ?? [];Then the $_POST returns empty. And so I can't then compare the two
Yasmine
ParticipantYou add a:
` if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
return;
}`Ok ignore me
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?
-
AuthorPosts