• Is there a function that I can use that executes the post to update right after the post is published automatically? If so, could I only target a certain post type as well?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Jason King

    (@jasoncharlesstuartking)

    Didn’t understand the question. Could you break that down into steps?

    1) A post is published
    2) Something (specifically what?) automatically updates

    Thread Starter wdrescher

    (@wdrescher)

    Once a post in published then it will trigger the execution of an update (like if I went to the post right after a publish and hit update) Do it only once.

    Jason King

    (@jasoncharlesstuartking)

    Why would you want to do that?

    Thread Starter wdrescher

    (@wdrescher)

    Well here it goes…

    I have a theme called “Musik” – Inside of Musik it uses a plugin called Easy Digital Downloads which allows you to sell music (We aren’t using the theme that way) – It also has the plugin Piklist which adds fields to Easy Digital Download like “Preview Media URL” which allows us to put in music so people can play it using an HTML5 player on the website.

    I use a plugin called FeedWordPress which automatically pulls an RSS feed of podcast from out account on AudioBoom and sends the mp3 url in to the “preview music url” field that Piklist adds. That works 100%.

    If I go to the post and play the audio it will not play UNTIL I hit update on the post and it sends an extra key to the database which I am having problems solving that.

    My worst case scenario is to fire off an auto-update after every publish is made in the post type. I am trying to automate all of this and there’s a lot of pieces.

    Jason King

    (@jasoncharlesstuartking)

    There must be a simple function to do this? I guess (beware, haven’t tested this idea) you’d need to use wp_update_post. Something needs to trigger the action i.e. publish (but not update, or you’d create a loop). See also publish_post.

    Maybe google those to see if anyone’s already solved this.

    Or can FeedWordPress schedule a post rather than publish it? Not sure if that would be any different, but worth a try.

    Might be worth checking the support forum for FeedWordPress to find out whether any other users have this issue.

    Now I’m blathering. Anyone else know the answer?

    Thread Starter wdrescher

    (@wdrescher)

    Thanks Jason for the thoughts…

    I did some googling and forum searching and really couldn’t find anything. It does sound simple in execution and I figured I might reach out to this awesome community.

    I figured I could get a code to only execute for a certain post type and just force an update after every publish or initial publish of that post.

    I tried reaching out to FeedWordpress and we didn’t get anywhere, not sure if it’s really the issue of the RSS plugin or the meta boxes. I figured this would be a simple band-aid until I make the right fix.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Is there a way to automatically update a post when a post is published in Wordpr’ is closed to new replies.