InsertableContentSource

The development world of a madman

WordPress Featured Image Plugin For Live Writer

For a while now, @ kipkniskern (my LiveSide mate) has been asking whether it was possible to be able to set the featured image of a post for WordPress. This would save everyone the job of publishing the post, then having to log into the site and manually set the featured image.

This was a seemingly simple request, but finding out how to do it was a nightmare. I eventually found that to set a post’s featured image, you needed to set a Custom Field for the post of “_thumbnail_id” and give the image’s attachment id as a reference. Simple, right? Wrong!

With the help of Brandon Turner’s excellent Custom Field plugin, I was able to test that this did in fact work and was what I needed to set from my own plugin. So I set about getting it all set up for the plugin. What I eventually discovered was that WordPress is a real pain in the ass. No, really! When you upload an image, all it returns is the image url, and doesn’t include the attachment id. To make matters worse, that custom field only accepts the image id, not the url. This was raised to WP some months ago, but as yet, nothing has been done about it.

Not to be deterred, I created a WordPress plugin that would do exactly the same as the normal image upload function, but returned the id as well. Unfortunately, in doing so, it means that this feature (featured image), which is accessible to both self hosted and wordpress.com users, can only be set in Live Writer for self hosted users. I hope I’ll be able to rectify this in the future.

So, onto the plugin itself. First of all, you need to install my WP plugin, which can be downloaded from http://bit.ly/ScottMediaObject. Install this through your WP dashboard, there are no settings.

Once that has been installed, download the Live Writer plugin from http://bit.ly/FeaturedImagePlugin and install it.

The only real interface for this plugin is the options window:
FeaturedImageOptions

Now, this plugin uses a new technique for allowing blog specific options (a blog post on how to do this will come soon). You will be presented with all configured WordPress blogs in the drop down, selecting one will give you a list of all the categories for this particular blog. The reason for this is you might only want to set the featured image for certain types of blog post; for example, if you only wanted to do it for posts with the category of ‘Featured.’ If no categories are set, then it will ask you for an image on every post.

The other option you can see is to use the post’s ID as the image name, this is on by default.

When you then go to publish your post, on first run, you’ll be prompted as to whether you would like Live Writer to run the plugin:
FeaturedImageEnablePlugin

If it is your first time running the plugin, or you choose not to save it, you will then be prompted for your blog’s password. Note: You will not be asked for the username, the plugin has already got that from your configured blog in Live Writer. You can choose to save this password (securely) in the plugin’s options. In the main plugin options, if you’ve chosen to save your password, there is an option to unsave it.

Once your password is entered, choose your featured image, and let the plugin do its thing.

I should point out, this plugin uses a modified version of Orbifold’s WordPress.net wrapper. I changed a few things to get the wrapper to talk to my WordPress plugin.

So there we go. Any feedback you have should be directed to me on twitter or in the comments.

WordPress plugin: http://bit.ly/ScottMediaObject
Live Writer plugin: http://bit.ly/FeaturedImagePlugin

SL

The URI to TrackBack this entry is: http://dev.scottisafool.co.uk/2011/05/24/wordpress-featured-image-plugin-for-live-writer/trackback/

1,387 Responses to “WordPress Featured Image Plugin For Live Writer”

  1. web link…

    Samedi rigolade! – Mon premier blog…

  2. sindustry.co says:

    Sindustry.co…

    Samedi rigolade! – Mon premier blog…

  3. hot-stock-alerts.info…

    Samedi rigolade! – Mon premier blog…

  4. Condo In Sg For Sale…

    Samedi rigolade! – Mon premier blog…

  5. forest woods upper serangoon singapore review…

    Samedi rigolade! – Mon premier blog…

  6. Continued…

    Samedi rigolade! – Mon premier blog…

  7. property market crash singapore 2013…

    Samedi rigolade! – Mon premier blog…

  8. villa for sale in Guadalmina baja marbella…

    Samedi rigolade! – Mon premier blog…

  9. Scalp micropigmentation cost…

    Samedi rigolade! – Mon premier blog…

  10. sbf center Vacancy…

    Samedi rigolade! – Mon premier blog…

  11. buying a house in singapore…

    Samedi rigolade! – Mon premier blog…

  12. Property Market forecast 2014 singapore…

    Samedi rigolade! – Mon premier blog…

  13. pokemon go cheat apk…

    Samedi rigolade! – Mon premier blog…

  14. sbf center sales…

    Samedi rigolade! – Mon premier blog…

  15. EC at Dundee Road…

    Samedi rigolade! – Mon premier blog…

  16. p-okraska.ru says:

    property auction singapore 2016…

    Samedi rigolade! – Mon premier blog…

  17. EC Launch 2016…

    Samedi rigolade! – Mon premier blog…

  18. Victoria Park Villas Capitaland progress…

    Samedi rigolade! – Mon premier blog…

  19. Kingsford Waterbay upper serangoon 2 bedroom…

    Samedi rigolade! – Mon premier blog…

  20. http://www.zxdpgjc.com/…

    Samedi rigolade! – Mon premier blog…

  21. Kingsford Waterbay Singapore discount…

    Samedi rigolade! – Mon premier blog…

  22. Kingsford Waterbay Singapore address…

    Samedi rigolade! – Mon premier blog…

  23. singapore hdb property for sale near hougang mrt…

    Samedi rigolade! – Mon premier blog…

  24. buying a house in singapore…

    Samedi rigolade! – Mon premier blog…

  25. It is the best choice for celebrities, also the best choice for you.
    Along with his charisma, he has been able to lead the company in order to as an international leader in terms of premium jean material as well as the everyday kind of sports wear for the male.
    You will need to earn the bonus (of 100 points) for most of
    the customers that arrive at the restaurant in order to achieve an expert score.

  26. krystal fx says:

    In 2002 Mr Ford received a Lindbergh Award for his efforts as an environmental river keeper, which identifies and prosecutes
    polluters of the Hudson River. “It was horrible,” Maynard tells People exclusively of the aftermath following
    the breakup of her second made-on-television relationship.
    However, the number one thing that the experts would make their clients do is to put cucumbers and tea bags on
    their eyelids 3 times daily before getting in front of the public.

  27. Free Hot Adult Chat Trials Sex Dating…

    Samedi rigolade! – Mon premier blog…

  28. cheap washing machines and dryers…

    Samedi rigolade! – Mon premier blog…

  29. Free Adult Chat Room Sites…

    Samedi rigolade! – Mon premier blog…

  30. vao bet88…

    Samedi rigolade! – Mon premier blog…

  31. photophobiasolutions.com…

    Samedi rigolade! – Mon premier blog…

  32. Taman Yuexiu terkenal dengan pemandangan yang indah dan terdapat
    sebilangan besar peninggalan sejarah seperti Five Ram Sculpture,
    Zenhai Tower , the positioning of the Ming Dynasty City Hall
    dan the Square Canon Site.

  33. power yoga…

    Samedi rigolade! – Mon premier blog…

  34. Going Here…

    Samedi rigolade! – Mon premier blog…

  35. source says:

    There is also several running themes in this movie which makes it more than just pointless action.
    The only thing is that I am also in favor of downloading.
    Provide your basic details and choose the membership mode with us.

  36. Blood and gore, although occasionally necessary, is what some
    movie directors resort to when they have no decent story line or
    credible script. To install a screensaver
    in the system, just copy the compiled SCR file (including the
    DAT file if you choose to pack files separately) to the System32
    subdirectory of the directory where the Windows operating system
    is installed. Regarder Boruto: Naruto the Movie Film Complet Gratuit en ligne Regarder
    Boruto: Naruto the Movie Ligne Gratuit , Regarder Boruto: Naruto the Movie Hindi Film Complet, Regarder Boruto: Naruto the Movie 2015 Film Complet Gratuit streaming Ligne avec sous-titres anglais pr”t pour le t”l”chargement , Boruto: Naruto the Movie 2015 720p , 1080p
    , BRRip , Dvd – Rip , Cap – Rip , Telesyc , Haute Qualit”, Non Buff
    , aucune enqu”te 22 sous-titre gratuit pour vous.

Leave a Reply

[InsertableContentSource is proudly powered by WordPress.]