Forum Replies Created
-
AuthorPosts
-
helmiaditya14MemberI didn’t know PHP that much to alter the code to generate custom taxonomy select dropdown with parent terms as optgroup. Anyone could help me?
Thanks!
helmiaditya14MemberWonderful! I’m sorry for my lack of basic PHP knowledge, since I was primarily a front-end coder.
Your code example did the trick I’ve been looking for the past couple of days. Piklist definitely worth 10-stars, now I need to catch up with my PHP knowledge so I can use its power properly.
Thank you!
helmiaditya14MemberThanks, Steve.
I already tried the conditional, and as expected, it works fine to prevents other roles to access it. However, users within the same role can still edit each other posts via the form if they put the post id on the edit url.
I was trying to check if current user is the author of the post/form, but how to get the post id inside the form? I tried
get_queried_object_idbut it returns different number. Moreover, is there a way to check if it’s new post or edit post?
helmiaditya14MemberThanks for the response, Steve.
I already tried that with some custom capabilities, but it doesn’t seem to work. Just made a new thread here.
Thanks!
helmiaditya14MemberAh, I completely missed that. Sorry for the low-quality question. Thanks for your efforts on this wonderful plugin!
helmiaditya14MemberI was trying to replicate this code into the front end form.
piklist('field', array( 'type' => 'select' ,'field' => 'select_optgroup' ,'label' => __('Select with Option Groups', 'piklist-demo') ,'value' => 'third' ,'choices' => array( 'Group 1' => array( 'first' => __('First Choice', 'piklist-demo') ,'second' => __('Second Choice', 'piklist-demo') ,'third' => __('Third Choice', 'piklist-demo') ) ,'Group 2' => array( 'first' => __('First Choice', 'piklist-demo') ,'second' => __('Second Choice', 'piklist-demo') ,'third' => __('Third Choice', 'piklist-demo') ) ) ));But I can’t figure how to adjust the example to populate custom taxonomy. Any help appreciated!
helmiaditya14MemberI see. Thanks Steve for the clarification.
I’m wondering if there’s any temporary quick fix for the bugs?
helmiaditya14Member@Steve, sorry to jump right in, but how to limit only post author is able to edit the form? Right now, anyone with the ID can edit it.
helmiaditya14MemberAnyone have solution for this?
helmiaditya14MemberThanks, ndbe! Tested your code and it works flawlessly on the backend.
However, I was trying to replicate the same thing on the front-end, but the page returned blank after submit and no data was saved. Any idea how to resolve this?
Thank you!
-
AuthorPosts