- This topic has 18 replies, 2 voices, and was last updated 7 years, 3 months ago by Tom.
February 25, 2015 at 11:48 am #80018Roberto Camacho
I have a blog bargainsnfinds.com. I have upgraded to premium thinking that the blog will show pictures but for some reason, the pictures aren’t showing on my post. I do have blog activated. I would love to show pictures without using the “featured image” as I insert the URL for my images so I don’t have to store them. I just use the vendor’s images based on the image link. Help!February 25, 2015 at 11:57 am #80020TomLead DeveloperLead Developer
In order for GP Premium to resize your image, it must be set as a featured image.
Here’s a plugin that might be helpful: https://wordpress.org/plugins/set-all-first-images-as-featured/February 25, 2015 at 12:26 pm #80031Roberto Camacho
The problem with this is that it selects the first image, which is the Shop Now button that I uploaded on my server as opposed to the URL that I inserted. I think URL isn’t being selected because it really isn’t an image file but a URL instead.
Any other ways?
There’s a way because I used a theme before wherein I didn’t put a featured image and it just picked up my URL that I included in the post.February 25, 2015 at 12:35 pm #80062TomLead DeveloperLead Developer
Hmm, without knowing the code, your previous theme most likely either:
a) Showed the full posts on the blog (no excerpt, stripping elements) – you can set your blog to do this in the Customizer.
b) Used code like this to pick out the first image in the post and applied it as the featured image: http://wordpress.stackexchange.com/questions/131411/programmatically-set-first-image-as-featured
I’m not sure of another way to do it unfortunately.
Using the code, there’s probably a way to look for images with a specific class, or ignore images with a specific class, but that would require some deeper digging.February 25, 2015 at 1:08 pm #80082Roberto Camacho
Nice. Please dig. As you can see from my site, no pictures on the left side except for when you get into the post itself. I need pictures in there. Please help as soon as you can.
Thanks!February 25, 2015 at 1:11 pm #80083Roberto Camacho
BTW, the previous them showed excerpt not full post. Let me find the theme.February 25, 2015 at 1:17 pm #80088Roberto Camacho
I believe it was mesocolumn from the WP themes.February 25, 2015 at 1:19 pm #80090Roberto Camacho
Yes, it was Mesocolumn. I can have the image to the left of the excerpt.February 25, 2015 at 1:20 pm #80091Roberto Camacho
I can activate that theme if it helps and then revert when you have fixed the issue?February 25, 2015 at 1:52 pm #80127TomLead DeveloperLead Developer
I just took a look at the code from the MesoColumn theme and have confirmed that they take the first image in the post and set it as the featured image.
Here’s an excerpt from the code:
$first_img = ''; ob_start(); ob_end_clean(); $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches); if($output): $first_img = $matches; endif;
This part gets the first match with an
$matchesFebruary 25, 2015 at 1:53 pm #80128Roberto Camacho
So why is it that when I set to get the first image, it can’t pick up? Strange.February 25, 2015 at 1:54 pm #80130Roberto Camacho
Would you be able to set that code inside as an addon?February 25, 2015 at 1:58 pm #80132Roberto Camacho
Just reran the first image plugin and now I am getting a question mark. Still no image. Anything else?February 25, 2015 at 2:11 pm #80135TomLead DeveloperLead Developer
This is probably happening because WordPress only allows local URLs to pass through
Have you tried saving the images and uploading them to your site instead of linking from other sites? This is good practice as the other sites can take images down or change them at any time.February 25, 2015 at 3:07 pm #80187Roberto Camacho
For posting efficiency, I prefer to use URLs. Easier, and I don’t have to tamper or store images. And I know to look at the post if I see a broken image, which is also why I like posting this way.
- You must be logged in to reply to this topic.