How to use “Get The Image” plugin to work with headway

Before diving in let me clarify one thing.

What is a featured image or a Post Thumbnail?

Featured Image or Post Thumbnail is an image  that is set  to represent a Posts, Pages or Custom Post Types.

featured-imageIt is not long time ago when I developed a site for a client of mine that has tones of post of it. The previous theme uses a plugin called “Get the Image“, what it does is that it pulls the first image in the post and set it as featured image. While the actual post itself does not have a featured image set on it on the back end,  the front-end does have it, this is where the plugin gets into work.

Working with headway, setting a featured post was really an easy task using the Visual Editor, it is just a tick on a contents block from the grid mode, but this only works if the actual post itself has a featured image on it. Everything can be resolved easily if I will just add the featured image manually, this should be an easy task only if you got a couple of post in it, but what if you have thousands of it, what will you do?

Although there are a couple of good plugins to automate the job, i decided not to use it, mainly because I want to maintain the integrity of the site structure, and also to warn that this is not reversible, you cannot undo the process, another plugin would do to automate it (i don’t know if a plugin to remove featured image does exist, i haven’t done a search for it), also adding a featured image on every post will surely increase the database size considering there are more than 6000 post on it. So I decided and dig deeper on how I can integrate the “Get the image” plugin to do the work for me.

It turns out that the couple of hours work only needs a few lines of code to accomplish.

So here is the simple process:

  1. Uncheck the “Show Featured Image” in your content block options in the grid mode of visual editor.
  2. Add this code to your headway child theme.

That is it. Congratulations.

See the code in action here

1 thought on “How to use “Get The Image” plugin to work with headway”

Leave a Comment