Note that there are some explanatory texts on larger screens.

plurals
  1. PODon't want div below post title to show in excerpt
    text
    copied!<p>I want to have a div setup directly underneath the post title which floats to the left and contains an adsense 300x250 block, and then the post content wraps around it on the right. All of this works fine when viewing the individual post... but when I go to the main page of my blog where it shows all of the post excerpts, it displays the div in there which I don't want. </p> <p>I've tried correcting this using CSS and just trying to target the div on the main page specifically and setting it to display none (i.e. .post_content.myAd{display:none;...}), and then having it visible by targeting the specific one (i.e. .single.myAd{display:inline;...} since my ad div 'myAd' is located within .post_content on the main page, but within .single on the individual blog post).</p> <p>This my full css:</p> <pre><code>.single.aboveVideoAd{ position: relative; display:inline; float: left; width: 300px; height: 250px; margin-right: 15px; margin-bottom: 15px; } .post_content.aboveVideoAd{ display:none; } </code></pre> <p>As requested, here is my html of the loop for index.php (which displays the excerpts) and single.php for the single post:</p> <p>index.php: <a href="http://pastebin.com/62gQfh2h" rel="nofollow">http://pastebin.com/62gQfh2h</a></p> <p>single.php: <a href="http://pastebin.com/x18G56CA" rel="nofollow">http://pastebin.com/x18G56CA</a></p> <p>Any ideas? I've seen tons of sites that have ad blocks under the post and don't have this issue, so I feel like there should be a more simple fix for it other than having to mess around with the css. </p> <p>Thanks!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload