Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Aug 2011
    Posts
    61
    Thanks
    12
    Thanked 0 Times in 0 Posts

    WORDPRESS - Hiding image from discription

    I Have the content on the index.php page limited to 300 char. That works like a charm and it displays how i want it to like this.



    It's just when i insert a image at the top of the post is when things goes heywire





    Index.php
    Code:
    <div id="top-blog">
    		<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
    		
    		<div class="post">
                <div class="top_entry">
    			   <div class="daysago">Posted <? wp_days_ago(); ?><br> By <?php the_author(); ?></div>
    			   
    					 <div class="thumb_img_top">
    			               <?php if ( has_post_thumbnail() ) {
                               the_post_thumbnail(array( 183,285 ));
                               } else { ?>
                              <img src="<?php bloginfo('template_directory'); ?>/images/default-image.png" width="285" height="183" alt="<?php the_title(); ?>" />
                              <?php } ?>
    		             </div><!---THUMB IMAGE-->
    
    				     <div class="posttitle_top">
    					     <a href="<?php the_permalink(); ?>" target="_blank"><?php echo substr(the_title('', '...', false), 0, 64); ?></a>
    					 </div>
    					 
                         <div class="content">
    					     <a href="<?php the_permalink(); ?>"><?php short_content(300); ?></a>
    					 </div>	
    					 
    					 
    					 
    					         <div id="tagged">
    					         <?php the_tags(); ?>
    					         </div><!--tagged-->
    							 
    					      <!--sharexy code start--><noindex>
    					      <div id='shr_530625'><script type='text/javascript'>(function(w) { if (!w.SharexyWidget) { w.SharexyWidget = {};} if (!w.SharexyWidget.Params) { w.SharexyWidget.Params = {}; } w.SharexyWidget.Params['530625'] = {'code_id':'530625','publisher_key':'ZBG-43264','design':'metro','layout_static':'h','type':'st','mode_float':'','size_float':'55','size_static':'32','buzz':'1','services':['facebook', 'twitter', 'reddit', 'google_plus', 'add_to_favorites'],'url':'current','allways_show_ads':'0','show_ads_sharing':'0','show_ads_cursor':'0','bg_float':'0','bg_color':'#f1f1f1','labels':'0','counters':'0', 'counters_float':'0'} })(window);</script><script type='text/javascript' src='http://shuttle.sharexy.com/Loader.js'></script>
    						  </div></noindex><!--sharexy code end -->  
    			</div><!---TOP_ENTRY-->
    		</div><!---POST-->
    		<?php endwhile; ?>
    		<?php endif; ?>
    	</div><!--top-blog-->


    I have

    .content img {
    display:none;
    }

    in css, but that doesn't seem to work.. Yea, it removes the image but that's about it.

    Anyone have an idea?

  • #2
    Regular Coder Arcticwarrio's Avatar
    Join Date
    May 2012
    Location
    UK
    Posts
    723
    Thanks
    20
    Thanked 84 Times in 84 Posts
    does it do the same with the image at the bottom of the post?
    There are 10 types of people on CodingForums,
    Those who understand Binary and those who dont.
    Get Cloud Hosting now from only£59 / month


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •