Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Forum: Hacks
    In reply to: post_id keeps changing
    Thread Starter adammmmm

    (@adammmmm)

    thanks everyone, would like to share the approach that i handle the post_meta wasn’t brought to the new post_id issue.
    I finally using the variable variables (php) and iterate again after getting getting new_post_id (2nd insert). It’s not nice and a bit chunky though….

    Forum: Hacks
    In reply to: post_id keeps changing
    Thread Starter adammmmm

    (@adammmmm)

    thx digibucc,
    i tried this approach as well, i used the wp_insert_post to create draft,
    do what i want and then user wp_insert_post (ID->post_id) to revise content and make it publish…but post_id altered….meta inserted into original post_id didn’t show on revised post, that’s the problem i faced.

    Forum: Hacks
    In reply to: post_id keeps changing
    Thread Starter adammmmm

    (@adammmmm)

    thx voodoo.
    my input form no. of items (& files) was variable so it’s quite difficult for me to manipulate the content without a post_id (or i have to manage a chunky code like using variable variables which is not preferred)

    let me simplified my question a bit:
    how could post_meta be brought along to the revised version of a post?

Viewing 3 replies - 1 through 3 (of 3 total)