• Hi –

    I’ve been using zinmag remedy theme for a few years, tweaking here and there. Works well for us but suddenly in Chrome, our “5 Freshest Reviews” sidebar isn’t showing the images. This works for all other browsers, but not in chrome.

    The code that defines this space in our template:

    <a>" <?php $homethumb = get_post_meta($post->ID,'homethumb', true); ?>
    <img src="<?php bloginfo('url'); ?>/wp-content/uploads/<?php echo strtolower($homethumb); ?>.jpg" width="100" height="60" alt=""/></a>

    I was reading around and perhaps that Chrome doesn’t like me defining the size of the image here. Does that mean I need to define it in the CSS? And if so, how?

    The site: https://www.candygurus.com

    Thanks for any help someone can provide….

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator t-p

    (@t-p)

    Those images also don’t appear in IE8.

    you also have some markup errors. See if sorting out these errors resolve the issue.

    https://codex.www.ads-software.com/Validating_a_Website

    Thread Starter mattyroze

    (@mattyroze)

    Thanks t-p. Finally started working through the issues, and yes indeed you are right. I got most of the issues fixed. Interestingly, the W3C shows issues with the embed code we’re taking from YouTube for our videos…

    Looking beyond the YT issue, the one thing I can’t quite figure out yet is the proper php syntax to get the images showing, per my initial question above. The error message says I’m using a shorttag where i shouldn’t be:

    <a href="https://www.candygurus.com/2010/12/03/camille-bloch-mousse-serious-eurostyle-chocolates/"
    <img src="https://www.candygurus.com/wp-content/uploads/moussesmall.jpg" width="100" height="60" alt=""/></a>

    I think the “<” before img src shouldn’t be there, but i’m pretty certain this is getting generated by the php, and I’m not sure what i need to change in the php so it doesn’t do this. If someone knows – I’d love the help. In the meantime I’ll keep trolling in hopes I can figure it out…

    The (potentially offending) php code:

    <div class="fblock">
    <a>" <?php $homethumb = get_post_meta($post->ID,'homethumb', true); ?>
    <img src="<?php bloginfo('url'); ?>/wp-content/uploads/<?php echo strtolower($homethumb); ?>.jpg" width="100" height="60" alt=""/></a>

    <a href="https://www.candygurus.com/2010/12/03/camille-bloch-mousse-serious-eurostyle-chocolates/"
    <img src="https://www.candygurus.com/wp-content/uploads/moussesmall.jpg" width="100" height="60" alt=""/></a>

    your block of code here, the first line of code isn’t closed. It’s missing the closing >

    so I assume its missing form the block of code you tried to post, but that got messed up by not having the closing backtic here (edit, you fixed it)

    I’m trying to figure out this line of code….?

    <a>" <?php $homethumb = get_post_meta($post->ID,'homethumb', true); ?>
    <a href="<?php $homethumb = get_post_meta($post->ID,'homethumb', true); ?>">

    maybe?
    `

    Thread Starter mattyroze

    (@mattyroze)

    Yep – the first line isn’t closed and it’s not because of what I copied, it actually isn’t closed in the page itself. Still isn’t. Just not sure how to get the PHP to fix that. Which is my biggest problem – I didn’t make the theme and don’t know much if anything about php so I’m not sure where the problem occurs. Is it in the PHP itself, which has the wrong syntax? I would think this is indeed the reason the thumbs on the page show only in some browsers and not others.

    I mis-pasted the PHP code before. This is what the PHP is for this section:

    <div class="fblock">
    <a href="<?php the_permalink() ?>" <?php $homethumb = get_post_meta($post->ID,'homethumb', true); ?>
    <img src="<?php bloginfo('url'); ?>/wp-content/uploads/<?php echo strtolower($homethumb); ?>.jpg" width="100" height="60" alt=""/></a>

    thanks…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Theme isn't working in Chrome…’ is closed to new replies.