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,425 Responses to “WordPress Featured Image Plugin For Live Writer”

  1. pmar.gr says:

    ΙΝΤΕΡΝΕΤ ΜΑΡΚΕΤΙΝΓΚ…

    Samedi rigolade! – Mon premier blog…

  2. Katrice says:

    In publications, material about Paris Hilton’s shopping fling in Australia sat alongside the fighting
    in the Gaza Strip. It can also be used in graphics designing softwares like Adobe Photoshop, Adobe Flash, GIMP,
    Corel Draw, just to name a few. And if you religiously read
    the newspapers, you will still have to wait till the next morning
    to get the latest issue.

  3. Ellie says:

    When families costume uup collectively for halloween costumes 2016 party city (Ellie),
    they tend to choose bwsic costumes similar to princesses and
    superheroes.

  4. Barminerals Smink…

    Samedi rigolade! – Mon premier blog…

  5. Each and every organization includes a unique service or identity and method of coping with
    audiences. The answer to that question for you is that this loops, logic and arithmetic
    calculations are done in JS language that can be easily a part of
    HTML anywhere. This will not merely help you save from painful cramps, but additionally enhance your productivity.

  6. bjdclub.ru says:

    velo appartement david douillet…

    Samedi rigolade! – Mon premier blog…

  7. Parfym says:

    Howdy! This is my first comment here so I just wanted to give
    a quick shout out and tell you I genuinely enjoy reading through your articles.
    Can you suggest any other blogs/websites/forums
    that deal with the same topics? Thanks for your time!

  8. Internet Page…

    Samedi rigolade! – Mon premier blog…

  9. This allows it to program and serve files faster,as compared to being attached to the department computer serving the applications.
    It supplies a gamers which has a user-friendly interface, low cost purchase and installation and the renowned brand
    equity offered by Microsoft. The enterprise information is fed into pricing and
    risk analysis data warehouse models.

  10. hoking.cc says:

    money fast…

    Samedi rigolade! – Mon premier blog…

  11. Hi it’s me, I am also visiting this site daily, this site is truly nice and the
    visitors are genuinely sharing pleasant thoughts.

    my web site best fence company

  12. prilosec says:

    I visit daily a few blogs and blogs to read posts,
    however this blog gives feature based posts.

  13. At the occasion, Bon Jovvi will inform Floridian it’s now or by no means” to
    go volte for hillary clinton twitter trump (https://keep.com) and to assist hher vision for
    an Americda that is stronger together.

  14. maybe you are the first person to break some local
    news. Browse our website & order our exquisite from jodhpur.
    Many different points of views that all point towards this major event have been causing
    a wave of panic and unrest among many.

  15. bisnis baju says:

    It’s an amazing piece of writing for all the internet people; they will get benefit from it I am sure.

  16. Shelley says:

    The message is not that Cliton iis a better choice, it is that anti trump republicans (Shelley)
    is so bad, basicly some other alternative would be better.

  17. Continue Collagen Serum contains natural ingredients such as Trylagen, a combination of
    active peptides and proteins that provide an efficient treatment against
    collagen damage and wrinkle development.

  18. Every weekend i used to visit this web page, for the reason that i wish for enjoyment, as this this web site conations genuinely good funny material
    too.
    تشریفات مجالس عروسی در رشت

  19. jokowi says:

    You should also need to know what particular time the economic release of each of the following country.
    Honestbaby contains parenting news on an extensive
    variety of parenting news topics, on common matters
    such as: childbirth, teething and breastfeeding.
    2 Medical Adhesives Main Application Share Analysis.

  20. Tyrell says:

    But staggeringly as this eventuality may be, this could hazard to any living soul in Pierce county in any fiscal year.
    Mc – Afee also advises buyers to use a credit card, not a debit card
    or wire transfer. You’ll be among the first to realize what the most
    sweltering subjects are in your industry.

  21. short quotes life tattoos…

    Samedi rigolade! – Mon premier blog…

  22. mouse click the up coming post…

    Samedi rigolade! – Mon premier blog…

  23. Elizabeth says:

    Marketing experts, using associative learning principles, analyzes the lifestyle of the celebrities to properly assign them to the brand which depicts them perfectly.
    Riding a Vespa scooter is much cheaper and more eco-friendly than taking the car, especially it’s very convenient if we’re going someplace nearby.
    The Sims 3 Late Night bar guide includes the following new bars in Bridgeport:.

  24. you’re actually a good webmaster. The website loading pace
    is incredible. It seems that you are doing any unique trick.
    Furthermore, The contents are masterwork. you’ve performed a magnificent process on this topic!

  25. Ariel Tatum says:

    In the media driven modern world, one simply needs to understand the who dynamics of the media to become famous.
    It is very essential for the user of nidora product for removing overweight problem that he or she must check review or have a
    consultation with the doctor or health specialist
    in case any doubts about this product arouse
    in his mind. Obviously, you will want to make sure that you research the celebrity’s accomplishments to make sure you have the correct
    information.

Leave a Reply

[InsertableContentSource is proudly powered by WordPress.]