21 reputation
3
bio website nn45.net
location Spain
age
visits member for 1 year, 6 months
seen May 6 at 10:37

Apr
25
asked Specific theme for non logged in users
Mar
26
awarded  Tumbleweed
Feb
18
comment Automatically add a tag according to custom metadata
Great! Works like a charm. Thanks a lot!
Feb
18
awarded  Student
Feb
18
awarded  Teacher
Feb
18
answered Automatically add a tag according to custom metadata
Feb
18
comment Automatically add a tag according to custom metadata
I do this: function is_featured_post(){ $postid = get_the_ID(); $featured = get_post_meta($postid, 'wpcf-slider-if', true); if ( $featured == 1 ) { wp_set_object_terms( $postid, 'Destacado', 'post_tag', true ); } } add_action ( 'publish_post', 'is_featured_post' ); But it doesn´t work. To me, the code looks fine. I don´t know what I´m doing wrong.
Feb
17
asked Automatically add a tag according to custom metadata