SitePoint Sponsor

User Tag List

Results 1 to 15 of 15
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2005
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Which WP plug-in is this...

    Have come across lots of cool WP plugins, but didnt see the one for this simple feature:

    - Plugin to always post a (square) adsense/affiliate ad or image on the top RHS of every post as in http://domainnamewire.com/

    Tks for any pointers.

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You don't need a plugin for that, you just edit your index/post templates.

  3. #3
    _ silver trophy ses5909's Avatar
    Join Date
    Jul 2003
    Location
    NoVa
    Posts
    5,466
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Dan Grossman View Post
    You don't need a plugin for that, you just edit your index/post templates.
    I think that is one feature of Wordpress that is highly unused and many people don't even know about its existence I would bet.
    Sara

  4. #4
    SitePoint Enthusiast
    Join Date
    Oct 2005
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Grossman View Post
    You don't need a plugin for that, you just edit your index/post templates.
    Thanks for the quick response Dan, do you think this is something that a non-coder can do quite easily? I've managed to find Manage/Files in the Admin... would appreciate any further advice from here.

  5. #5
    Non-Member QiSoftware's Avatar
    Join Date
    Oct 2004
    Location
    U.S.
    Posts
    366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am using Opera on a Mac-- I do not see the ad in domainnamewire.com. Am I missing something?

    Q...

  6. #6
    SitePoint Enthusiast
    Join Date
    Dec 2006
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question

    Quote Originally Posted by QiSoftware View Post
    I am using Opera on a Mac-- I do not see the ad in domainnamewire.com. Am I missing something?

    Q...
    same here
    Gadgets Gaming and Tech News
    Bidding Directory PR3 bidding directory

    Link Hut Link Bidding Website

  7. #7
    Bananas contain Zinc fonzerelli_79's Avatar
    Join Date
    Oct 2001
    Location
    Scotland
    Posts
    816
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can just use css

    Code:
    <div style=”display:block;float:right;margin: 0px 0px 5px 10px;”>
    put your adsense code here
    </div>
    though youd be as well putting the code in your css file

    eg

    Code:
    <div class="adsense">
    put your adsense code here
    </div>
    and then css code

    Code:
    .adsense {
    display:block;
    float:right;
    margin: 0px 0px 5px 10px;
    }
    just place it in your single.php file before the main content

  8. #8
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    If you've given write permission to your wp-content/themes/themename directory, you can edit the templates from within your WordPress admin area.

  9. #9
    SitePoint Enthusiast
    Join Date
    Oct 2005
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by QiSoftware View Post
    I am using Opera on a Mac-- I do not see the ad in domainnamewire.com. Am I missing something?

    Q...
    The big TrafficZ affiliate ad/image... do you see it

  10. #10
    SitePoint Enthusiast
    Join Date
    Oct 2005
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by fonzerelli_79 View Post
    you can just use css

    Code:
    <div style=”display:block;float:right;margin: 0px 0px 5px 10px;”>
    put your adsense code here
    </div>
    though youd be as well putting the code in your css file

    eg

    Code:
    <div class="adsense">
    put your adsense code here
    </div>
    and then css code

    Code:
    .adsense {
    display:block;
    float:right;
    margin: 0px 0px 5px 10px;
    }
    just place it in your single.php file before the main content
    Should all 3 sets of code be put in the single.php file, one after another.

  11. #11
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Those are two methods of doing the same thing, one with inline CSS, one with CSS that should be placed in the stylesheet.

    If you go with the first, just paste it into single.php above where the post content is inserted.

  12. #12
    SitePoint Enthusiast
    Join Date
    Oct 2005
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Grossman View Post
    If you go with the first, just paste it into single.php above where the post content is inserted.
    I tried putting it in the single.php between:

    <div id="content" class="widecolumn">

    and

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    ...but it didnt work. Is that where you mean by "above where the post content is inserted."?

  13. #13
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    No, lower down, below that second line. Assuming you know a little HTML, you should be able to pick out what code corresponds to the post title, author name, date, etc. and figure out what part of the output you're looking at.

  14. #14
    SitePoint Enthusiast
    Join Date
    Oct 2005
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Grossman View Post
    No, lower down, below that second line. Assuming you know a little HTML, you should be able to pick out what code corresponds to the post title, author name, date, etc. and figure out what part of the output you're looking at.
    Dan, i tried it in a couple of other places and then tried to hit refresh to see the results, but no luck. The final place i tried was before:

    Code:
    <div class="post" id="post-<?php the_ID(); ?>">
    			<h2><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title();
    I know some very basic html and this is my first go at learning WP and trying to do it myself, so thanks for your patience.

    I've pasted the whole single.php below (hope thats ok) so it may be easier to identify where the correct place should be. In addition, there's one bit that seems a little confusing:
    Code:
    <p class="postmetadata alt">
    					<small>
    					This entry was posted
    						<?php /* This is commented, because it requires a little adjusting sometimes.
    							You'll need to download this plugin, and follow the instructions:
    							http://binarybonsai.com/archives/2004/08/17/time-since-plugin/ */
    							/* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); echo time_since($entry_datetime); echo ' ago'; */ ?>
    						on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?>
    						and is filed under <?php the_category(', ') ?>.
    						You can follow any responses to this entry through the <?php comments_rss_link('RSS 2.0'); ?> feed.
    - Does this mean that the particular plugin needs to be downloaded and installed? This is a fresh WP installation.

    Copy of Single.php file:

    Code:
    <?php get_header(); ?>
    
    	<div id="content" class="widecolumn">
    
    
    
    	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <?php if(function_exists('the_ratings')) { the_ratings(); } ?> 
    
    
    		<div class="navigation">
    			<div class="alignleft"><?php previous_post_link('&laquo; %link') ?></div>
    			<div class="alignright"><?php next_post_link('%link &raquo;') ?></div>
    		</div>
    
    		<div class="post" id="post-<?php the_ID(); ?>">
    			<h2><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); 
    
    ?></a></h2>
    
    			<div class="entry">
    				
    
    
    <?php the_content('<p class="serif">Read the rest of this entry &raquo;</p>'); ?>
    
    				<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    
    				<p class="postmetadata alt">
    					<small>
    
    
    					This entry was posted
    						<?php /* This is commented, because it requires a little adjusting sometimes.
    							You'll need to download this plugin, and follow the instructions:
    							http://binarybonsai.com/archives/2004/08/17/time-since-plugin/ */
    							/* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); echo time_since($entry_datetime); 
    
    echo ' ago'; */ ?>
    						on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?>
    						and is filed under <?php the_category(', ') ?>.
    						You can follow any responses to this entry through the <?php comments_rss_link('RSS 2.0'); ?> feed.
    
    
    
    						<?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
    							// Both Comments and Pings are open ?>
    							You can <a href="#respond">leave a response</a>, or <a href="<?php trackback_url(true); ?>" 
    
    rel="trackback">trackback</a> from your own site.
    
    						<?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
    							// Only Pings are Open ?>
    							Responses are currently closed, but you can <a href="<?php trackback_url(true); ?> " 
    
    rel="trackback">trackback</a> from your own site.
    
    						<?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
    							// Comments are open, Pings are not ?>
    							You can skip to the end and leave a response. Pinging is currently not allowed.
    
    						<?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
    							// Neither Comments, nor Pings are open ?>
    							Both comments and pings are currently closed.
    
    						<?php } edit_post_link('Edit this entry.','',''); ?>
    
    					</small>
    				</p>
    
    			</div>
    		</div>
    
    	<?php comments_template(); ?>
    
    	<?php endwhile; else: ?>
    
    		<p>Sorry, no posts matched your criteria.</p>
    
    <?php endif; ?>
    
    	</div>
    
    <?php get_footer(); ?>

  15. #15
    Non-Member
    Join Date
    Dec 2006
    Posts
    269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Just wanted to warn you, in case you didn't already know, that there is a limit to the number of Google ads that you can display on a single page. If you modify the php script, then you either have to limit the number of posts to two, or to stop inserting the ad after the first two posts. There were some examples of this on Wordpress.org, but the code wasn't very good. I modified it to work on my blog but discarded the ads, because I learned that readers found them too intrusive.

    Rich


Bookmarks

Posting Permissions

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