Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-16-2012, 05:35 PM   PM User | #1
kor81
New Coder

 
Join Date: Aug 2011
Posts: 49
Thanks: 9
Thanked 0 Times in 0 Posts
kor81 is an unknown quantity at this point
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?
kor81 is offline   Reply With Quote
Old 09-17-2012, 08:22 PM   PM User | #2
Arcticwarrio
Regular Coder

 
Arcticwarrio's Avatar
 
Join Date: May 2012
Location: UK
Posts: 574
Thanks: 15
Thanked 64 Times in 64 Posts
Arcticwarrio is on a distinguished road
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.
Arcticwarrio is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:29 PM.


Advertisement
Log in to turn off these ads.