Is there a way to connect the WP sticky entry function? I'm using Gravity Forms to allow a client to submit entries from the front end, and I would like to have the same "Sticky" option in the form as appears in the WP backend.
Thanks for your help.
Is there a way to connect the WP sticky entry function? I'm using Gravity Forms to allow a client to submit entries from the front end, and I would like to have the same "Sticky" option in the form as appears in the WP backend.
Thanks for your help.
Would you want all the posts submitted via the form to be sticky, or do you just want to allow them to check sticky, or not?
In either case, you can change the post status using the gform_after_submission hook. Instead of changing the post content (as in the example) you would change the post sticky status, based on the value of the checkbox (if you are doing this conditionally) or for all posts created with your form.
I would like it to be an option to make the post sticky, i.e. a checkbox. Would I need to use $post->post_status? Would the sticky value be $sticky? Unfortunately, I'm a real hack when it comes to php.
Chris - I want to do the same thing but I don't know much (any) php. I looked at the "Gform after submission" link and I understand in theory how I can change the first example but lack the know how. Would line 9 on your link look something like this?
$stickies->is_sticky = true;
Also, where do I put this code?
Thank you for your help!!
Hi - just checking in about my question above posted a week ago - Thank you!!
I'm really interested in knowing how to do this but am not sure how to go about getting started.
I'd like to add a an option to make a post sticky or not.
Can anyone offer any assistance?
Thanks for any help in advance!
-Jack
esnoke - Where to put code: http://www.gravityhelp.com/documentation/page/Where_Do_I_Put_This_Code%3F
voltronik - The hook and instructions have been listed above by Chris. If you don't have the development skills required to make this modification, please post it in our Job Board and I'm sure someone would be happy to help.
No, no. That's fine.
The thread was a little sporadic and didn't realise that's where I needed to start.
Thanks for pointing it out in your reply.
-Jack