Reply To: Problem importing images from existing wp

Post count: 10
April 9, 2015 at 1:01 am #10697

It looks like your current theme is pulling the first attached image and using that as the featured image. However, the JMAGZ theme requires that a featured image be manually selected for each post.

To fix this, you could add some code to /lib/common-function.php

After the ‘if statement’ on line 112 erase the current ‘else clause’ and paste this:

In other words, lines 112 through 139 will look like this:

What this does is search for the first JPG image that’s attached to a post (if a featured image isn’t already manually selected) and uses that image as the featured image. If you need it to also look for other image types (i.e. png, gif, etc.), you’ll have to add the appropriate mime types.