WordPress.org

Forums

KIA Subtitle
Copy historic post titles to subtitle (2 posts)

  1. willyeckaslike
    Member
    Posted 12 months ago #

    Hi

    I have just downloaded this plugin, and it works perfectly for what I need.

    While it's great going forwards for new posts, one thing I would like to do is replicate the titles of my historic posts into the new sub-title field.

    Is this possible/straightforward? I'm assuming it will need some MySQL scripting.

    While I am ok editing PHP, I'm not so hot on MySQL so any help would be appreciated!

    https://wordpress.org/plugins/kia-subtitle/

  2. helgatheviking
    Member
    Plugin Author

    Posted 12 months ago #

    I'm not sure I see the point in having the subtitle be the same as the title? The subtitle is only post meta( key= kia_subtitle ). If you are ok with PHP then query all the posts, loop through them and update_post_meta() on ones that don't have a subtitle. No MySQL needed.

    This is by no means correct for your situation, but as an example of how to loop through posts and update read my answer here:

    http://wordpress.stackexchange.com/questions/47153/how-to-batch-update-post-content-with-custom-post-meta-value#answer-47164

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.