• Resolved Daniel Chase

    (@riseofweb)


    Is there a simple way to add keywords to a post using PHP?

    I have tried this but for some reason it is not working:

    $value = "keyword 1, keyword 2";
    update_post_meta($post_id, 'ilj_linkdefinition', $value);

    I could not find anything online about this.

    Love the plugin. Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support markilj

    (@markilj)

    Thank you for contacting us.

    You can try adding it as an array as our plugin uses array for separating each keywords.

    $value = array('keyword 1', 'keyword 2');
    
    update_post_meta($post_id, 'ilj_linkdefinition', $value);

    I hope this helps let us know if you need anything else.

    Thank you

    Thread Starter Daniel Chase

    (@riseofweb)

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Saving Post Keywords via PHP’ is closed to new replies.