Advice Needed

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
SpaceshipSpaceship
Watch

LeadingWholesale

Established Member
Impact
0
Hi guy's

I have wordpress article directory theme
And i want to know in my categories pages

I have empty place from the right of the child categories
like here : Business | MagazineArticle

Where in the code i need to put my adsense to show the ad from the right of the child categories ??

Here the code :
<?php get_header(); ?>

<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php if (is_category()) { ?>
<h2 class="pagetitle">Archive for the "<?php echo single_cat_title(); ?>" Category</h2>
<?php } ?>


<div class="nav">
<a href="<?php bloginfo('url'); ?>/">Home</a> » <?php echo(get_category_parents($cat, TRUE, ' » ')); ?>
</div>


<?php if (get_categories('child_of='.$cat.'&hide_empty=0')) { ?>
<h3>Subcategories:</h3>
<ul class="child-categories">
<?php wp_list_categories('show_count=1&child_of='.$cat.'&hide_empty=0&title_li='); ?>
</ul>
<?php } else { ?>
<?php
$ID = $wp_query->posts[0]->ID;
$postcat = get_the_category($ID);
$cat = $postcat[0]->cat_ID;
$parent = get_category($cat);
?>

<?php if ($parent->parent) { ?>
<h3>Other Subcategories of the "<?php $parentCat = get_category($parent->parent); echo $parentCat->cat_name; ?>" Category:</h3>
<ul class="child-categories">
<?php error_reporting(0); wp_list_categories ('show_count=1&child_of='.$parent->parent.'&exclude='.$cat.'&hide_empty=0&title_li='); ?>
</ul>
<?php } else {
echo '<h3>No articles in this category.</h3>';
} ?>
<?php } ?>


<?php
$order = "&orderby=cost&order=DESC";
$s2 = ' selected="selected"';
if ($_POST['select'] == 'title') { $order = "&orderby=title&order=ASC"; $s1 = ' selected="selected"'; $s2 = ''; }
if ($_POST['select'] == 'newest') { $order = "&orderby=cost&order=DESC"; $s2 = ' selected="selected"'; }
if ($_POST['select'] == 'oldest') { $order = "&orderby=cost&order=ASC"; $s3 = ' selected="selected"'; $s2 = ''; }
?>

<form method="post" id="order">
Sort by:
<select name="select" onchange='this.form.submit()'>
<option value="title"<?=$s1?>>Title</option>
<option value="newest"<?=$s2?>>Newest</option>
<option value="oldest"<?=$s3?>>Oldest</option>
</select>
</form>

<div class="line"></div>

<?php if (have_posts()) : ?>
<?php $posts = query_posts($query_string . $order); ?>
<?php while (have_posts()) : the_post(); ?>

<div class="post">
<h3><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
<div class="postmetadata"><?php the_time('m.d.Y') ?> | Author: <a href="<?php bloginfo('url'); ?>/author/<?php the_author_login(); ?>/"><?php the_author() ?></a> | Posted in <?php the_category(', ') ?> | <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></div>
<div class="entry">
<?php the_excerpt(); ?>
</div>
</div>

<?php endwhile; ?>

<div class="navigation"><?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?></div>

<?php else : endif; ?>

<?php get_sidebar(); ?>
<?php get_footer(); ?>

Thanks a million
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Appraise.net

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover

NamePros updates

New in Parking: updated way to act on many domains or inquiries at once
Your domain list and inquiry list now have a bar above and below the list. Check the items you want, then choose an action in the bar...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back