RSS de categorías

TV Internautas

¿Dónde se inserta el código de Google Adsense en el tema Fusion de Worpress?

También lo indico para el tema Atahualpa

Valencia, 01/06/2010, G.B.
Para que te aparezca al final de cada post, una vez en el mismo, debes insertar el código de tu cuenta de Google Adsense en la página single.php de tu tema Fusion de WordPress. Escribo esto porque yo he tenido que eliminarlo, y si alguna vez puedo y quiero volverlo a insertar, deberé recordar la ubicación exacta.

Copio y pego el código fuente de la página single.php del tema (theme) Fussion de Wodpress, eso sí, sin el script de Google Adsesne, el cual ya no tengo vigente en el blog en el que tengo el tema Fussion instalado:

<?php /* Fusion/digitalnature */ ?>
<?php get_header(); ?>

  <!-- mid content -->
  <div id="mid-content">
  <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="navigation">
      <div class="alignleft"><?php previous_post_link('&laquo; %link') ?></div>
      <div class="alignright"><?php next_post_link('%link &raquo;') ?></div>
      <div class="clear"></div>
    </div>

    <?php if (function_exists("post_class")) { ?>
    <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    <?php } else { ?>
    <div class="post" id="post-<?php the_ID(); ?>">
    <?php } ?>
	   <h2><?php the_title(); ?></h2>
       <br />
	   <div class="entry">
          <div class="postbody entry clearfix">
	       <?php the_content(__('Read the rest of this entry &raquo;', 'fusion')); ?>
<strong><span style="color: #ff0000;"><!-- ADSENSE -->
<!-- INSERTA AQUÍ TU CÓDIGO DE GOOGLE ADSENSE -->
<!-- ADSENSE --></span></strong>
><br />
          </div>
          <?php wp_link_pages(array('before' => '<p><strong>Pages: </strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
          <?php
          $posttags = get_the_tags();
          if ($posttags) { ?>
          <p class="tags"><?php the_tags(''); ?></p>
          <div class="clear"></div>
          <?php } ?>
          <p class="postmetadata alt">
			<small>
        		<?php _e('This entry was posted on','fusion'); ?>
        		<?php the_time(__('l, F jS, Y','fusion')) ?>, <?php the_time() ?>
        		<?php _e('and is filed under','fusion'); ?>
                <?php the_category(', ') ?>.
                <?php _e('You can follow any responses to this entry through','fusion');echo ' ';post_comments_feed_link('RSS 2.0');echo '.'; ?>
                <?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
        		  // Both Comments and Pings are open
                  printf(__('You can <a href="#respond">leave a response</a>, or <a href="%s" rel="trackback">trackback</a> from your own site.', 'fusion'),

trackback_url('',false));

        		 } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
        		  // Only Pings are Open
                  printf(__('Responses are currently closed, but you can <a href="%s" rel="trackback">trackback</a> from your own site.', 'fusion'), trackback_url('',false));

        		 } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
        		  // Comments are open, Pings are not
        		  _e('You can skip to the end and leave a response. Pinging is currently not allowed.','fusion');

        		 } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
        		  // Neither Comments, nor Pings are open
        		  _e('Both comments and pings are currently closed.','fusion');
        		} ?>
                <?php edit_post_link(__('Edit this entry', 'fusion')); ?>
            </small>
		  </p>
	   </div>
    </div>
	<?php comments_template(); ?>
  <?php endwhile; else: ?>
    <p><?php _e("Sorry, no posts matched your criteria.","fusion"); ?></p>
  <?php endif; ?>
 </div>
    <!-- mid content -->
   </div>
   <!-- /mid -->

   <?php get_sidebar(); ?>

<?php get_footer(); ?>

Para el tema Atahualpa de WordPress, deberás insertarlo en la página index.php.  Dejo también el código. Espero que te sirva:

<?php
global $options;
foreach ($options as $value) {
	if (get_option( $value['id'] ) === FALSE) {
		$$value['id'] = $value['std'];
	} else {
		$$value['id'] = get_option( $value['id'] );
	}
}
if ( is_page() ) { global $wp_query; $current_page_id = $wp_query->get_queried_object_id(); }
?>
<?php get_header(); ?>
<?php // If there are any posts:
if (have_posts()) : $postcount == 0; ?>
<?php if( is_archive() AND function_exists('page2cat_output')) { page2cat_output($cat); } // This is for the plugin Page2Cat http://wordpress.org/extend/plugins/page2cat/ ?>

	<?php
	// Next/Previous PAGE Links (on multi post pages)
	// in next_posts_link "next" means older posts
	if ( !is_single() AND !is_page() AND strpos($bfa_ata_location_multi_next_prev,'Top')!==false AND show_posts_nav() ) {
		if (function_exists('wp_pagenavi')) {
			echo '<div class="wp-pagenavi-navigation">'; wp_pagenavi(); echo '</div>';
		} else {
			echo '<div class="navigation-top">
			<div class="older' . $nav_home_add . '">';
			$bfa_ata_next_prev_orientation == 'Older Left, Newer Right' ?
			next_posts_link(bfa_escape($bfa_ata_multi_next_prev_older)) :
			previous_posts_link(bfa_escape($bfa_ata_multi_next_prev_newer));
			echo ' &nbsp;</div>' . $nav_home_div . '<div class="newer' . $nav_home_add . '">&nbsp; ';
			$bfa_ata_next_prev_orientation == 'Older Left, Newer Right' ?
			previous_posts_link(bfa_escape($bfa_ata_multi_next_prev_newer)) :
			next_posts_link(bfa_escape($bfa_ata_multi_next_prev_older));
			echo '</div>
			<div class="clearboth"></div>
			</div>';
		}
	}
	?>

	<?php // Do this for all posts:
	while (have_posts()) : the_post(); $postcount++; ?>

		<?php
		// Next/Previous POST Links (on single post pages)
		// in next_post_link "next" means newer posts
		if ( is_single() AND strpos($bfa_ata_location_single_next_prev,'Top')!==false ) {
			echo '<div class="navigation-top">
			<div class="older' . $nav_home_add_single . '">';
			$bfa_ata_next_prev_orientation == 'Older Left, Newer Right' ? previous_post_link(bfa_escape($bfa_ata_single_next_prev_older)) :
			next_post_link(bfa_escape($bfa_ata_single_next_prev_newer));
			echo ' &nbsp;</div>' . $nav_home_div_on_single . '<div class="newer' . $nav_home_add_single . '">&nbsp; ';
			$bfa_ata_next_prev_orientation == 'Older Left, Newer Right' ? next_post_link(bfa_escape($bfa_ata_single_next_prev_newer)) :
			previous_post_link(bfa_escape($bfa_ata_single_next_prev_older));
			echo '</div>
			<div class="clearboth"></div>
			</div>';
		} ?>

		<div class="post<?php
		// new WP 2.7 "sticky" class only on real blog homepage
		if (function_exists('is_sticky')) {
			if ( is_home() AND !is_paged() AND is_sticky() ) {
				echo " sticky";
			}
		}
		?>">

		<?php // Post Kicker
		if( (is_home() && $bfa_ata_post_kicker_home != "") OR
		(is_page() && $bfa_ata_post_kicker_page != "") OR
		(is_single() && $bfa_ata_post_kicker_single != "") OR
		( (is_archive() OR is_search() OR is_author() OR is_tag()) && $bfa_ata_post_kicker_multi != "") ) {
			echo '<div class="post-kicker">';
				if ( is_home() ) { echo postinfo("$bfa_ata_post_kicker_home"); }
				elseif ( is_page() ) { echo postinfo("$bfa_ata_post_kicker_page"); }
				elseif ( is_single() ) { echo postinfo("$bfa_ata_post_kicker_single"); }
				else { echo postinfo("$bfa_ata_post_kicker_multi"); }
			echo '</div>';
		} ?>

		<!-- Post Headline -->
		<div class="post-headline">
		<h2><?php
		if( !is_single() AND !is_page() ) { ?>
			<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php
			if (function_exists('the_title_attribute')) {
				the_title_attribute();
			}
			elseif (function_exists('the_title')) {
				the_title();
			} ?>"><?php
		} the_title();
		if( !is_single() AND !is_page() ) { ?>
			</a><?php
		} ?>
		</h2>
		</div>

		<?php // Post Byline
		if( (is_home() && $bfa_ata_post_byline_home != "") OR
		(is_page() && $bfa_ata_post_byline_page != "") OR
		(is_single() && $bfa_ata_post_byline_single != "") OR
		( (is_archive() OR is_search() OR is_author() OR is_tag()) && $bfa_ata_post_byline_multi != "") ) {
			echo '<div class="post-byline">';
			if ( is_home() ) { echo postinfo("$bfa_ata_post_byline_home"); }
			elseif ( is_page() ) { echo postinfo("$bfa_ata_post_byline_page"); }
			elseif ( is_single() ) { echo postinfo("$bfa_ata_post_byline_single"); }
			else { echo postinfo("$bfa_ata_post_byline_multi"); }
			echo '</div>';
		} ?>

		<!-- Post Body Copy -->
		<div class="post-bodycopy clearfix">
		<?php if ((is_home() && $bfa_ata_excerpts_home == "Full Posts") OR
		(is_category() && $bfa_ata_excerpts_category == "Full Posts") OR
		(is_date() && $bfa_ata_excerpts_archive == "Full Posts") OR
		(is_tag() && $bfa_ata_excerpts_tag == "Full Posts") OR
		(is_search() && $bfa_ata_excerpts_search == "Full Posts") OR
		(is_author() && $bfa_ata_excerpts_author == "Full Posts") OR
		is_single() OR
		is_page() OR (is_home() AND !is_paged() AND $postcount <= $bfa_ata_full_posts_homepage) ) {
			$bfa_ata_more_tag_final = str_replace("%post-title%", the_title('', '', false), $bfa_ata_more_tag);
			the_content(bfa_escape($bfa_ata_more_tag_final));
		} else {
			the_excerpt();
		} ?>
		</div>

		<?php // Post Pagination
		if ((is_home() && $bfa_ata_excerpts_home == "Full Posts") OR
		(is_category() && $bfa_ata_excerpts_category == "Full Posts") OR
		(is_date() && $bfa_ata_excerpts_archive == "Full Posts") OR
		(is_tag() && $bfa_ata_excerpts_tag == "Full Posts") OR
		(is_search() && $bfa_ata_excerpts_search == "Full Posts") OR
		(is_author() && $bfa_ata_excerpts_author == "Full Posts") OR
		is_single() OR
		is_page() ) {
			wp_link_pages('before=<p class="post-pagination"><strong>' . __('Pages:','atahualpa') . '</strong> &after=</p>&next_or_number=number');
		} ?>

		<?php // Show Archives page if configured
		if ( is_page() AND $current_page_id == $bfa_ata_archives_page_id ) { ?>
			<div class="archives-page">

			<?php if ( $bfa_ata_archives_date_show == "Yes" ) { ?>
				<h3><?php echo $bfa_ata_archives_date_title; ?></h3>
				<ul>
				<?php wp_get_archives('type=' . $bfa_ata_archives_date_type . '&show_post_count=' . ($bfa_ata_archives_date_count == "Yes" ? '1' : '0')); ?>
				</ul>
			<?php }

			if ( $bfa_ata_archives_category_show == "Yes" ) { ?>
				<h3><?php echo $bfa_ata_archives_category_title; ?></h3>
				<ul>
				<?php wp_list_categories('title_li=&orderby=' . $bfa_ata_archives_category_orderby .
				'&order=' . $bfa_ata_archives_category_order .
				'&show_count=' . ($bfa_ata_archives_category_count == "Yes" ? '1' : '0') .
				'&depth=' . $bfa_ata_archives_category_depth .
				($bfa_ata_archives_category_feed == "Yes" ? '&feed_image=' . get_bloginfo('template_directory') . '/images/icons/feed.gif' : '')); ?>
				</ul>
			<?php } ?>

			</div>
		<?php } ?>

		<?php // Post Footer
		if( (is_home() && $bfa_ata_post_footer_home != "") OR
		(is_page() && $bfa_ata_post_footer_page != "") OR
		(is_single() && $bfa_ata_post_footer_single != "") OR
		( (is_archive() OR is_search() OR is_author() OR is_tag()) && $bfa_ata_post_footer_multi != "") ) {
			echo '<div class="post-footer">';
			if ( is_home() ) { echo postinfo("$bfa_ata_post_footer_home"); }
			elseif ( is_page() ) { echo postinfo("$bfa_ata_post_footer_page"); }
			elseif ( is_single() ) { echo postinfo("$bfa_ata_post_footer_single"); }
			else { echo postinfo("$bfa_ata_post_footer_multi"); }
			echo '</div>';
		} ?>

<!-- ADSENSE  -->
<!-- INSERTA AQUÍ TU CÓDIGO DE GOOGLE ADSENSE -->
<!-- ADSENSE --><br />

		</div><!-- / Post -->

		<?php // Next/Previous POST Links (on single post pages)
		if ( is_single() AND strpos($bfa_ata_location_single_next_prev,'Middle')!==false ) {
			echo '<div class="navigation-middle">
			<div class="older' . ($bfa_ata_home_single_next_prev != '' ? '-home' : '') . '">';
			$bfa_ata_next_prev_orientation == 'Older Left, Newer Right' ? previous_post_link(bfa_escape($bfa_ata_single_next_prev_older)) :
			next_post_link(bfa_escape($bfa_ata_single_next_prev_newer));
			echo ' &nbsp;</div>' . ($bfa_ata_home_single_next_prev!= '' ? '<div class="home"><a href="' . get_option('home') . '/">' .
			$bfa_ata_home_single_next_prev . '</a></div>' : '') . '<div class="newer' . ($bfa_ata_home_single_next_prev != '' ? '-home' : '') . '">&nbsp; ';
			$bfa_ata_next_prev_orientation == 'Older Left, Newer Right' ? next_post_link(bfa_escape($bfa_ata_single_next_prev_newer)) :
			previous_post_link(bfa_escape($bfa_ata_single_next_prev_older));
			echo '</div>
			<div class="clearboth"></div>
			</div>';
		} ?>

		<?php // Load Comments template (on single post pages, and "Page" pages, if set on options page)
		if ( is_single() OR ( is_page() && $bfa_ata_comments_on_pages == "Yes") ) {
			if (function_exists('paged_comments')) {
				paged_comments_template(); // If plugin "Paged Comments" is activated, for WP 2.6 and older
				} else {
				comments_template(); // This will load either legacy comments template (for WP 2.6 and older) or the new standard comments template (for WP 2.7 and newer)
			}
		} ?>

		<?php // Next/Previous POST Links (on single post pages)
		// in next_post_link "next" means newer
		if ( is_single() AND strpos($bfa_ata_location_single_next_prev,'Bottom')!==false ) {
			echo '<div class="navigation-bottom">
			<div class="older' . ($bfa_ata_home_single_next_prev != '' ? '-home' : '') . '">';
			$bfa_ata_next_prev_orientation == 'Older Left, Newer Right' ?
			previous_post_link(bfa_escape($bfa_ata_single_next_prev_older)) :
			next_post_link(bfa_escape($bfa_ata_single_next_prev_newer));
			echo ' &nbsp;</div>' . ($bfa_ata_home_single_next_prev!= '' ? '<div class="home"><a href="' . get_option('home') . '/">' .
			$bfa_ata_home_single_next_prev . '</a></div>' : '') . '<div class="newer' . ($bfa_ata_home_single_next_prev != '' ? '-home' : '') . '">&nbsp; ';
			$bfa_ata_next_prev_orientation == 'Older Left, Newer Right' ?
			next_post_link(bfa_escape($bfa_ata_single_next_prev_newer)) :
			previous_post_link(bfa_escape($bfa_ata_single_next_prev_older));
			echo '</div>
			<div class="clearboth"></div>
			</div>';
		} ?>

	<?php // END of: Do this for all posts
	endwhile; ?>

	<?php
	// Next/Previous PAGE Links (on multi post pages)
	// in next_posts_link "next" means older
	if ( !is_single() AND !is_page() AND strpos($bfa_ata_location_multi_next_prev,'Bottom')!==false AND show_posts_nav() ) {
		if (function_exists('wp_pagenavi')) {
			echo '<div class="wp-pagenavi-navigation">'; wp_pagenavi(); echo '</div>';
		} else {
			echo '<div class="navigation-bottom">
			<div class="older' . $nav_home_add . '">';
			$bfa_ata_next_prev_orientation == 'Older Left, Newer Right' ?
			next_posts_link(bfa_escape($bfa_ata_multi_next_prev_older)) :
			previous_posts_link(bfa_escape($bfa_ata_multi_next_prev_newer));
			echo ' &nbsp;</div>' . $nav_home_div . '<div class="newer' . $nav_home_add . '">&nbsp; ';
			$bfa_ata_next_prev_orientation == 'Older Left, Newer Right' ?
			previous_posts_link(bfa_escape($bfa_ata_multi_next_prev_newer)) :
			next_posts_link(bfa_escape($bfa_ata_multi_next_prev_older));
			echo '</div>
			<div style="clear:both"></div>
			</div>';
		}
	} ?>

<?php
// END of: If there are any posts
// If there are no posts:
else :
?>

	<h2><?php _e('Not Found','atahualpa'); ?></h2>
	<p><?php _e("Sorry, but you are looking for something that isn't here.","atahualpa"); ?></p>

<?php endif; ?>

<?php get_footer(); ?>

Enlaces:
- Los 10 mejores plugins de WordPress para Adsense
- Adsense en WordPress para novatos
- Temas WordPress gratuitos

Related Posts with Thumbnails
Comparte y disfruta:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • BarraPunto
  • Bitacoras.com
  • Slashdot
  • StumbleUpon
  • email
  • Blogplay
  • Technorati
  • Yahoo! Bookmarks
  • LinkedIn
  • PDF
  • RSS
  • Twitter
  • Add to favorites
  • Meneame
  • Yahoo! Buzz

Posts (entradas) relacionados(as):

  1. Solucionado tema subcategorías en phpLD e inclusión de Adsense Valencia, 19/04/2010, G.B. Anoche creé las categorías que quería en...
  2. Una cuenta de Adsense de 2007 sin utilizar! Valencia, 22/03/2010, G.B. Ahora entiendo el porqué Google no me...

Related posts brought to you by Yet Another Related Posts Plugin.


1 comment to ¿Dónde se inserta el código de Google Adsense en el tema Fusion de Worpress?

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>




Statcounter