Thumbnail doesn't show. Please help

Discussion in 'PHP' started by romioaa, Mar 4, 2014.

  1. #1
    romioaa, Mar 4, 2014 IP
  2. stephan2307

    stephan2307 Well-Known Member

    Messages:
    1,277
    Likes Received:
    33
    Best Answers:
    7
    Trophy Points:
    150
    #2
    not sure what your code does but the src of the img tags are all empty

    example
    <img src="" alt="Flappy Soul" class="corner iradius16" width = "100" height = "100" />
    HTML:
     
    stephan2307, Mar 5, 2014 IP
  3. romioaa

    romioaa Notable Member

    Messages:
    1,368
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    200
    #3
    Honestly I don't know where to look, here are some of the files I believe I have to look, is a wordpress theme:

    Index.php
    <?php get_header(); ?>
    
    <?php
    
    /* ID of your 'Breaking News' Category */
    $breaking_cat = "1";
    
    /* How many posts from above category to display? Default = 3 */
    $breaking_num = "4";
    
    /* Number of recent posts to display under the Breaking News */
    $latest_num = "18";
    /* IDs of any cats you dont want to include in Recent posts.
    Start each ID with a 'minus' symbol Seperate by a comma & space.
    EG: $latest_ignore = "-7,-6,-8,-1";
    Posts from the 'Breaking' category are automatically excluded. */
    $latest_ignore = "";
    ?>
    
    
    <!-- Show x Posts from Breaking News -->
    <?php query_posts('showposts='.$breaking_num.'&cat='.$breaking_cat.'');
    while (have_posts()) : the_post();
    ?>
    
    <div class="gameoutpost">
    <div class="gamepost">
    <a href="<?php the_permalink(); ?>" class="thumb"><img src="<?php echo get_post_meta($post->ID, "thumbnail_url", true); ?>" alt="<?php the_title(); ?>" class="corner iradius16" width = "100" height = "100" /></a>
    <h2><a href="<?php the_permalink(); ?>" class="gametitle"><?php $title = the_title('','',FALSE); echo substr($title, 0, 25); ?></a></h2>
    <p class="gamedesc">
    <?php
    $trim_length = 120;  //desired length of text to display
    $custom_field = 'description';
    $value = get_post_meta($post->ID, $custom_field, true);
    if ($value) {
    echo rtrim(substr($value,0,$trim_length)) . '...';
    }
    ?>
    </p>
    <div class="clear"></div>
    <iframe class="facebooklike" src="http://www.facebook.com/plugins/like.php?href=<?php echo rawurlencode(trackback_url(false)) ?>&amp;layout=button_count&amp;show_faces=false&amp;width=300&amp;action=like&amp;font=lucida+grande&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:300px; height:21px;" allowTransparency="true"></iframe>
    </div>
    </div>
    
    
    
    
    
    <?php endwhile; ?>
    
    <div class="clear"></div>
    <br>
    <center><a href="/category/flappy-games/"><img src="../../images/header.png" alt="Latest Flash Games " /></a></center>
    <h2>Latest Games</h2>
       
    <!-- Show x Latest Posts -->
    <?php query_posts('showposts='.$latest_num.'&paged='.$paged.'&cat=-'.$breaking_cat.','.$latest_ignore.'&order=desc'); ?>
    <?php while (have_posts()) : the_post(); ?>
    
    <div class="gameoutpost">
    <div class="gamepost">
    <a href="<?php the_permalink(); ?>" class="thumb"><img src="<?php echo get_post_meta($post->ID, "mabp_thumbnail_url", true); ?>" alt="<?php the_title(); ?>" class="corner iradius16" width ="100" height = "100" /></a>
    <h2><a href="<?php the_permalink(); ?>" class="gametitle"><?php $title = the_title('','',FALSE); echo substr($title, 0, 25); ?></a></h2>
    <p class="gamedesc">
    <?php
    $trim_length = 120;  //desired length of text to display
    $custom_field = 'description';
    $value = get_post_meta($post->ID, $custom_field, true);
    if ($value) {
    echo rtrim(substr($value,0,$trim_length)) . '...';
    }
    ?>
    </p>
    <div class="clear"></div>
    <iframe class="facebooklike" src="http://www.facebook.com/plugins/like.php?href=<?php echo rawurlencode(trackback_url(false)) ?>&amp;layout=button_count&amp;show_faces=false&amp;width=300&amp;action=like&amp;font=lucida+grande&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:300px; height:21px;" allowTransparency="true"></iframe>
    </div>
    </div>
    
    <?php endwhile; ?>
    
    
    <div class="clear"></div>
    
    
    
    
    <?php get_footer(); ?>
    PHP:


    Search.php

    <?php get_header(); ?>
    
    <h2>Search Result for <?php /* Search Count */ $allsearch = &new WP_Query("s=$s&showposts=-1"); $key = wp_specialchars($s, 1); $count = $allsearch->post_count; _e(''); _e('"<span class="search-terms">'); echo $key; _e('</span>"'); _e(' &mdash; '); echo $count . ' '; _e('game(s)'); wp_reset_query(); ?></h2>
    
    <?php if (have_posts()) : ?>
    
    
    <?php while (have_posts()) : the_post(); ?>
    
    <div class="gameoutpost">
    <div class="gamepost">
    <a href="<?php the_permalink(); ?>" class="thumb"><img src="<?php echo get_post_meta($post->ID, "thumbnail_url", true); ?>" alt="<?php the_title(); ?>" class="corner iradius16" width = "100" height = "100" /></a>
    <h2><a href="<?php the_permalink(); ?>" class="gametitle"><?php $title = the_title('','',FALSE); echo substr($title, 0, 25); ?></a></h2>
    <p class="gamedesc">
    <?php
    $trim_length = 120;  //desired length of text to display
    $custom_field = 'description';
    $value = get_post_meta($post->ID, $custom_field, true);
    if ($value) {
    echo rtrim(substr($value,0,$trim_length)) . '...';
    }
    ?>
    </p>
    <div class="clear"></div>
    <iframe class="facebooklike" src="http://www.facebook.com/plugins/like.php?href=<?php echo rawurlencode(trackback_url(false)) ?>&amp;layout=button_count&amp;show_faces=false&amp;width=300&amp;action=like&amp;font=lucida+grande&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:300px; height:21px;" allowTransparency="true"></iframe>
    </div>
    </div>
    
    <?php endwhile; ?>
    <?php else : ?>
    
    <div id="noresults">
    <p>Sorry, no games found.</p>
    <p>Please check your spelling and repeat a search or go to <a href="<?php bloginfo('url'); ?>">Homepage</a> and try browsing from there.</p>
    </div>
    
    <?php endif; ?>
    
    <div class="clear"></div>
    
    
    <?php get_footer(); ?>
    
    PHP:










     
    romioaa, Mar 5, 2014 IP
  4. WebLab

    WebLab Active Member

    Messages:
    229
    Likes Received:
    7
    Best Answers:
    2
    Trophy Points:
    65
    #4
    Disable Search Everything plugin, and see if it works.
     
    WebLab, Mar 5, 2014 IP