1

I am trying to make a post sticky on publish or update based on a custom field. I use the code below but it doesn't work.

What am I doing wrong?

function stick_post_on_save( $post_id ) { $ed_plus = get_post_meta( $post_id, 'ed_plus', true ); if ( $ed_plus ) { stick_post($post_id); } } add_action( 'save_post', 'stick_post_on_save' ); 
0

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.