• this is the site

    http://comobajardepesoya.com/

    i want to put the adsense on top of the first post?

    or customize it, how do i do that?

    this is the index php

    <?php get_header();
    $loopcounter=0;
    ?>
    <div id="content">
    	<?php $current_tag = single_tag_title("", false); if ($current_tag) echo '<div class="tagarchive"><h1>'.ucwords($current_tag).'</h1></div>'?>
    
    	<?php if (have_posts()) : while (have_posts()) : the_post(); $loopcounter++; ?>
    
    		<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    
    			<div class="entry entry-<?php echo $postCount ;?>">
    
    				<div class="entrytitle_wrap">
    					<?php if (!is_page()) : ?>
    						<div class="entrydate">
    							<div class="dateMonth">
    								<?php the_time('M');?>
    							</div>
    							<div class="dateDay">
    								<?php the_time('j'); ?>
    							</div>
    						</div>
    					<?php endif; ?>
    
    					<div class="entrytitle">
    					<?php if ($loopcounter==1):?>
    						<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Link to %s', 'amazinggrace'), get_the_title()); ?>"><?php the_title(); ?></a></h1>
    					<?php else : ?>
    						<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Link to %s', 'amazinggrace'), get_the_title()); ?>"><?php the_title(); ?></a></h2>
    					<?php endif; ?>
    					</div>
    				</div>
    
    				<div class="entrybody">
    					<?php if (is_archive() || is_search()) : ?>
    						<?php the_excerpt(); ?><p><?php printf('<a href="%s">', get_permalink()); _e('Mas sobre ', 'amazinggrace'); the_title(); ?></a></p>
    					<?php else : ?>
    						<?php the_content(__('Read the rest of this entry &raquo;', 'amazinggrace'));   ?>
    						<?php wp_link_pages(); ?>
    					<?php endif; ?>
    				</div>
    
    				<div class="entrymeta">
    					<div class="postinfo"> 
    
    						<?php if ($loopcounter==1) social_bookmarks(); ?>
    						<?php if (is_single()): ?>
    						 <span class="postedby"><?php printf(__('Escrito por %s', 'amazinggrace'), get_the_author()); ?></span>
    <?php the_tags('<p>'.__('Tags: ', 'amazinggrace'), ', ', '</p>'); ?>
    <span class="filedto"><?php the_category(', ') ?> </span>
    						<?php endif; ?>
    
    						<?php if (!is_singular()): ?>
    							<span class="commentslink"><?php comments_popup_link(__('Agrega Un Comentario »', 'amazinggrace'), __('Agrega Un Comentario »', 'amazinggrace'), _n('% Comment »', '% Comentarios, Agrega El Tuyo »', get_comments_number(), 'amazinggrace'));?></span>
    						<?php else: ?>
    							<span class="rss"><?php _e('Subscribete a el ', 'amazinggrace') ?><a href="<?php bloginfo('rss2_url'); ?>" title="<?php _e('Subscribe to RSS feed', 'amazinggrace'); ?>" ><abbr title="<?php _e('Subscribe to RSS Feed', 'amazinggrace'); ?>">RSS</abbr></a> feed</span>
    						<?php endif; ?>
    
    						<?php edit_post_link(__('Edit', 'amazinggrace'), ' | ', ''); ?>
    
    					</div>
    				</div>
    
    				<?php if ($loopcounter == 1 && !is_singular()) { get_template_part('ad_middle.php'); } ?>                 
    
    			</div>	
    
    			<?php if (is_singular()): ?>
    				<div class="commentsblock">
    					<?php comments_template(); ?>
    				</div>
    			<?php endif; ?>
    
    	</div>
    
    	<?php endwhile; ?>
    
    	<?php if (!is_singular()): ?>
    		<div id="nav-global" class="navigation">
    			<div class="nav-previous">
    			<?php
    				next_posts_link(__('&laquo; Artículos Para Perder Peso Anteriores', 'amazinggrace'));
    				echo '&nbsp;';
    				previous_posts_link(__('Siguientes Artículos Para Adelgazar &raquo;', 'amazinggrace'));
    			?>
    			</div>
    		</div>
    
    	<?php endif; ?>
    
    	<?php else : ?>
    
    		<h2><?php _e('Not Found', 'amazinggrace') ?></h2>
    		<div class="entrybody"><?php _e("Sorry, but you are looking for something that isn't here.", "amazinggrace"); ?></div>
    	<?php endif; ?>
    
    </div>
    
    <?php get_footer(); ?>
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter hustleturtle

    (@hustleturtle)

    and can someone please tell me what does

    <?php if ($loopcounter == 1 && !is_singular()) { get_template_part('ad_middle.php');

    actually do? cause on the theme they said that is where i put adsense, but they dont specify which dimension? or if its actually working?

    Thread Starter hustleturtle

    (@hustleturtle)

    i dont like adsense plugins

    they are confusing and make you share revenue

    Moderator t-p

    (@t-p)

    check this new plugin released today:

    MySimpleAds

    See if it can do what you need it to do.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘how to put adsense’ is closed to new replies.