Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 05-29-2010, 07:35 PM Php help needed
Junior Talker

Posts: 2
Trades: 0
Hi guy's

I have wordpress article directory them and i have in my categories pages
empty place from the right of the child categories you can take a look at

http://www.magazinearticle.net/category/business

I want to put in this space a adsense ads
what i need to chenge in the code to show the ad in this empty place ?

Here the code:
PHP 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> &raquo; <?php echo(get_category_parents($catTRUE' &raquo; ')); ?>
  </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

Last edited by chrishirst; 05-30-2010 at 06:00 AM..
leading is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-30-2010, 10:33 AM Re: Php help needed
Junior Talker

Posts: 2
Trades: 0
Thanks for nothing
leading is offline
Reply With Quote
View Public Profile
 
Old 05-30-2010, 01:41 PM Re: Php help needed
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
It's SUNDAY!!!! Have some patience,

Either that or HIRE SOMEBODY if you want to to set a schedule. Members here don't HAVE to assist you, they do so voluntarily!

So your choice!
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 05-30-2010, 05:13 PM Re: Php help needed
mad_willsy's Avatar
Super Spam Talker

Latest Blog Post:
R&R Catering Hire Testimonial
Posts: 805
Name: Will Craig
Location: Cheltenham, Gloucestershire, UK
Trades: 0
I was going to tell you how to sort it but with that attitude you have no chance!
__________________
Wont :P

Please login or register to view this content. Registration is FREE
mad_willsy is offline
Reply With Quote
View Public Profile Visit mad_willsy's homepage!
 
Old 05-30-2010, 06:04 PM Re: Php help needed
Junior Talker

Posts: 3
Trades: 0
I have a website just like yours,
removed
so I am very familiar with that wordpress script, but I do not understand where is the empty space you are talking about?

Last edited by chrishirst; 05-31-2010 at 12:22 PM..
zelok is offline
Reply With Quote
View Public Profile
 
Old 05-31-2010, 11:58 AM Re: Php help needed
mad_willsy's Avatar
Super Spam Talker

Latest Blog Post:
R&R Catering Hire Testimonial
Posts: 805
Name: Will Craig
Location: Cheltenham, Gloucestershire, UK
Trades: 0
Leading means the white space by the side of the sub-category I think. Just a simple float or even absolute positioning could be used to place the adverts to the side of the subcategories.
__________________
Wont :P

Please login or register to view this content. Registration is FREE
mad_willsy is offline
Reply With Quote
View Public Profile Visit mad_willsy's homepage!
 
Reply     « Reply to Php help needed
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.97278 seconds with 12 queries