Site logo

Archived topic

Bought GP Premium

18 replies · Started by Roberto Camacho on February 25, 2015

Viewing posts 1–15 of 19

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!

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.

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.

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!

BTW, the previous them showed excerpt not full post. Let me find the theme.

I believe it was mesocolumn from the WP themes.

Yes, it was Mesocolumn. I can have the image to the left of the excerpt.

I can activate that theme if it helps and then revert when you have fixed the issue?

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[1][0]; endif;

This part gets the first match with an <img> tag: $matches[1][0]

So why is it that when I set to get the first image, it can't pick up? Strange.

Would you be able to set that code inside as an addon?

Just reran the first image plugin and now I am getting a question mark. Still no image. Anything else?

This is probably happening because WordPress only allows local URLs to pass through the_post_thumbnail() function.

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.

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.

This archived topic is closed to new replies.