Auto Post Thumbnail skipping first image
-
It’s supposed to catch the first image … but for some reason, it seems to be jumping that and selecting a subsequent image.
The first image has the following format:
<img src=”/images/wiki/musclerelaxingcreamdisp.jpg”> <div id=”product_tabs_description_tabbed_contents”> <h2>Details</h2>
<div class=”std”>which it skips, and stops tags similar to :
<img style=”display: block; margin-left: auto; margin-right: auto;” src=”https://www.wikaniko.com/shop/media/wysiwyg/aloescience.jpg” alt=”” /></span></p>
<p>In short, it ignored “<img src …” in preference for “<img s***” (in this case style)
I’ve looked at code, and it looks like it SHOULD have captured the first line, (preg_match_all(‘/<\s*img [^\>]*src\s*=\s*[\””\’]?([^\””\’>]*)/i’) but it skips for some reason. Alas, don’t know enough about regex to decode that pattern.
Can anyone throw any light?
- The topic ‘Auto Post Thumbnail skipping first image’ is closed to new replies.