Copy and Paste HTML code to index.php? (Posted Again b/c of Phantom post)
-
Hey all.
I would like to insert a gateway onto the main index of my wordpress blog.
The gateway site that generated this code for me says all I have to do is paste this code (below) right before the </head> tag.
<script src=”https://adscendmedia.com/gatejs.php?aff=1972&prf=223&sid=” type=”text/javascript”></script><noscript>Enable Javascript to access this page. Powered by the Adscend Media Affiliate Network<meta http-equiv=”refresh” content=”0;url=https://adscendmedia.com/gateway_nojs.php”></noscript>
However, since there is no index.HTML am I to assume that I need to be working with the index.php file instead?
if so, this is the code for the index.php file when i’m in “Appearance editor” within wordpress:
<?php get_header(); ?>
<div class=”mainbody”>
<div class=”leftcontent”>
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_category()) { ?>
<h2 class=”pagetitle”>Archive for the ‘
<?php single_cat_title(); ?>
’ Category</h2>
<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
<h2 class=”pagetitle”>Posts Tagged ‘
<?php single_tag_title(); ?>
’</h2>
<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<h2 class=”pagetitle”>Archive for
<?php the_time(‘F jS, Y’); ?>
</h2>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<h2 class=”pagetitle”>Archive for
<?php the_time(‘F, Y’); ?>
</h2>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<h2 class=”pagetitle”>Archive for
<?php the_time(‘Y’); ?>
</h2>
<?php /* If this is an author archive */ } elseif (is_author()) { ?>
<h2 class=”pagetitle”>Author Archive</h2>
<?php /* If this is a paged archive */ } elseif (isset($_GET[‘paged’]) && !empty($_GET[‘paged’])) { ?>
<h2 class=”pagetitle”>Blog Archives</h2>
<?php } ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class=”post” id=”post-<?php the_ID(); ?>”>
<div class=”posthead”>
<div class=”date”>
<?php the_time(‘d’, ”, ”); ?>
<span class=”datemonth”>
<?php the_time(‘M’, ”, ”); ?>
</span></div>
<h1 class=”posttitle”>” rel=”bookmark”>
<?php the_title(); ?>
</h1>
<div class=”titlecomments”>
<?php comments_popup_link(__(‘0 Comments’), __(‘1 Comment’), __(‘% Comments’)); ?>
</div>
</div>
<div class=”thecontent”>
<div class=”post_related”>
<div class=”addthis”>
<script type=”text/javascript”>
addthis_url = location.href;
addthis_title = document.title;
addthis_pub = ‘3drockz’;
</script>
<script type=”text/javascript” src=”https://s7.addthis.com/js/addthis_widget.php?v=12″ ></script>
</div>
</div>
<div class=”innercontent”>
<?php the_content(__(‘more…’)); ?>
</div>
<?php posts_nav_link(‘ ‘, __(‘? Previous Page’), __(‘Next Page ?’)); ?>
<?php comments_template(); // Get wp-comments.php template ?>
<div class=”postcategories”>Posted under: <?php printf(__(‘%6$s’),’Tags’,
get_the_time(‘Y-m-d’),
get_the_time(‘H:i:sO’),
the_date(”, ”, ”, false),
get_the_time(),
get_the_category_list(‘, ‘),
get_permalink(),
wp_specialchars(get_the_title(), ‘double’),
comments_rss() ) ?> </div>
</div>
</div>
<?php endwhile; else: ?>
<p class=”sorrydialog”>
<?php _e(‘Sorry, no posts matched your criteria.’); ?>
</p>
<?php endif; ?>
</div>
<?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>Or maybe I need to look at the index.php code by opening it up as a text document?
Please help me paste this piece of code somewhere so it activates when people hit my main page:
<script src=”https://adscendmedia.com/gatejs.php?aff=1972&prf=223&sid=” type=”text/javascript”></script><noscript>Enable Javascript to access this page. Powered by the Adscend Media Affiliate Network<meta http-equiv=”refresh” content=”0;url=https://adscendmedia.com/gateway_nojs.php”></noscript>
Thankxx
- The topic ‘Copy and Paste HTML code to index.php? (Posted Again b/c of Phantom post)’ is closed to new replies.