Bought GP Premium

Home Forums Support Bought GP Premium

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #80018
    Roberto 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!

    #80020
    Tom
    Lead Developer
    Lead Developer

    Hi Roberto,

    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/

    #80031
    Roberto 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.

    #80062
    Tom
    Lead Developer
    Lead 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.

    #80082
    Roberto 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!

    #80083
    Roberto Camacho

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

    #80088
    Roberto Camacho

    I believe it was mesocolumn from the WP themes.

    #80090
    Roberto Camacho

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

    #80091
    Roberto Camacho

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

    #80127
    Tom
    Lead Developer
    Lead 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[1][0]; endif;

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

    #80128
    Roberto Camacho

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

    #80130
    Roberto Camacho

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

    #80132
    Roberto Camacho

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

    #80135
    Tom
    Lead Developer
    Lead Developer

    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.

    #80187
    Roberto 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.

Viewing 15 posts - 1 through 15 (of 19 total)
  • You must be logged in to reply to this topic.