How to edit posts information in the database?
-
Hello, I simply want to change the title and permalink of a post that I know the ID of. I’m thinking something like this
$post = get_post($id); $post->title = 'my title'; $post->permalink = 'my-title'; $post->save();
These probably aren’t real properties or methods so, what do I need to do?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to edit posts information in the database?’ is closed to new replies.