Go Back   Webmaster Malaysia Forum » Web Blogging & Community » Blogging Discussion

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-01-2007, 10:59 AM
dannyfoo's Avatar
Novice Webmaster
 
Join Date: Oct 2006
Location: Malaysia
Posts: 64
Rep Power: 27
dannyfoo is on a distinguished road
How To: Put banner in between Wordpress post

I've still not found the answer for this. Well, I have but it's only for WP 1.5 and not 2.0+.

How do I insert a banner/Adsense in between my 1st and 2nd post on the Index Template?

Currently, my code is like this:
PHP Code:
<div id="content">
    <?php if (have_posts()) :?>
        <?php $postCount=0?>
        <?php while (have_posts()) : the_post();?>
            <?php $postCount++;?>
    <div class="entry entry-<?php echo $postCount ;?>">
        <div class="entrytitle">
            <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2> 
            <h3><?php the_time('F jS, Y'?></h3>
        </div>
        <div class="entrybody">
<?php the_content('<p>Read the rest of this entry &raquo;</p>'); ?>
        </div>
        
        <div class="entrymeta">
        <div class="postinfo">
            <span class="postedby">Posted by <?php the_author() ?></span>
            <span class="filedto">Filed in <?php the_category(', '?><?php edit_post_link('Edit'' | '''); ?></span>
<?php comments_popup_link('No Comments »''1 Comment »''% Comments »''commentslink'); ?> | <?php if(function_exists('the_views')) { the_views(); } ?>
<script src="http://feeds.feedburner.com/~s/WebsitesMadeSimple?i=<?php the_permalink() ?>" type="text/javascript" charset="utf-8"></script>
        </div>
        </div>
        
    </div>
    <div class="commentsblock">
        <?php comments_template(); ?>
    </div>
    <?php endwhile; ?>

<?php next_posts_link('&laquo; Previous Entries'?> | <?php previous_posts_link('Next Entries &raquo;'?>

        
    <?php else : ?>

        <h2>Not Found</h2>
        <div class="entrybody">Sorry, but you are looking for something that isn't here.
</div>
    <?php endif; ?>
</div>
Hope someone could help me out with this.

Thanks.
__________________
Websites Made Simple is my Malaysia website design blog.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 12-01-2007, 07:29 PM
limcs's Avatar
Administrator
 
Join Date: Jul 2006
Location: Penang
Posts: 1,768
Rep Power: 10
limcs has a spectacular aura about limcs has a spectacular aura about limcs has a spectacular aura about
Put the code before the looping ends:

PHP Code:
    <?php endwhile; ?>
__________________
Read the Rules
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 13-01-2007, 09:58 AM
dannyfoo's Avatar
Novice Webmaster
 
Join Date: Oct 2006
Location: Malaysia
Posts: 64
Rep Power: 27
dannyfoo is on a distinguished road
Urm, it works but it's being repeated in the middle of all my posts.

I want it to only appear between the 1st and 2nd recent post.

Thanks.
__________________
Websites Made Simple is my Malaysia website design blog.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 15-01-2007, 10:11 PM
dannyfoo's Avatar
Novice Webmaster
 
Join Date: Oct 2006
Location: Malaysia
Posts: 64
Rep Power: 27
dannyfoo is on a distinguished road
Nevermind, stumbled on a solution through Google and explained it for easier understanding on my blog.

Websites Made Simple Blog » Blog Archive » How To: Insert Horizontal Banner between 1st and 2nd Post - Sharing simple website design, ideas, practices with Malaysia.
__________________
Websites Made Simple is my Malaysia website design blog.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 16-01-2007, 09:07 PM
limcs's Avatar
Administrator
 
Join Date: Jul 2006
Location: Penang
Posts: 1,768
Rep Power: 10
limcs has a spectacular aura about limcs has a spectacular aura about limcs has a spectacular aura about
Quote:
Originally Posted by dannyfoo View Post
Ah, that solves it. Thanks for sharing.
__________________
Read the Rules
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 18-01-2007, 06:02 PM
ApOgEE's Avatar
Novice Webmaster
 
Join Date: Jan 2007
Location: Ampang, KL
Posts: 32
Rep Power: 0
ApOgEE is on a distinguished road
Send a message via Yahoo to ApOgEE
Question How about Blogs hosted at WordPress.com?

have anyone experienced inserting adsense banner in a blog post that is hosted at WordPress.com?
__________________
Coder's Talk | Art Of ApOgEE | (coming soon... )
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 18-01-2007, 06:16 PM
mysticmind's Avatar
Super Moderator
 
Join Date: Jun 2001
Location: Mystic Kingdoms
Posts: 2,687
Rep Power: 145
mysticmind will become famous soon enough mysticmind will become famous soon enough
Send a message via Yahoo to mysticmind
Quote:
Originally Posted by ApOgEE View Post
have anyone experienced inserting adsense banner in a blog post that is hosted at WordPress.com?
Wordpress.com TOS said, they not allow any ads in their blog service. Some people banned/suspended due promoting AFFILIATE and REFERAL program .

So!.. easy.. get your own domain and hosting
__________________
Personal's Blog! - Malaysian Artist!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 18-01-2007, 07:57 PM
robot's Avatar
Senior Webmaster
 
Join Date: Jul 2006
Location: My
Posts: 969
Rep Power: 48
robot will become famous soon enough
you could switch to blogger.com instead
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 20-01-2007, 12:49 PM
ApOgEE's Avatar
Novice Webmaster
 
Join Date: Jan 2007
Location: Ampang, KL
Posts: 32
Rep Power: 0
ApOgEE is on a distinguished road
Send a message via Yahoo to ApOgEE
yeah... i got it!! thanks everybody... i think now i have to switch to paid hosting... no hanky panky... and i can start learning straight away...
__________________
Coder's Talk | Art Of ApOgEE | (coming soon... )
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 23-01-2007, 05:33 PM
dannyfoo's Avatar
Novice Webmaster
 
Join Date: Oct 2006
Location: Malaysia
Posts: 64
Rep Power: 27
dannyfoo is on a distinguished road
LoL! well, it ain't that expensive to get a reliable, professional, performing paid hosting plan today.
__________________
Websites Made Simple is my Malaysia website design blog.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 28-01-2007, 12:34 AM
Novice Webmaster
 
Join Date: Jan 2007
Location: Surabaya
Posts: 11
Rep Power: 0
buchin is on a distinguished road
if you want to use wordpress for test only, you may use 110mb.com.
you'll get 2 gigs space. I usually use this hosting for a testing server.
uload your zip there and extract. it's easy.
__________________
Check my blog: masbuchin.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 28-01-2007, 03:50 AM
izzatz13's Avatar
Inspired Webmaster
 
Join Date: Nov 2006
Location: PeNaNG - KL
Posts: 180
Rep Power: 28
izzatz13 is on a distinguished road
Send a message via MSN to izzatz13 Send a message via Yahoo to izzatz13
danny i still cant find way around to play with k2 theme.. they said its gotta be somewhere 'the_loop'...

give it some rest...
__________________
Izzatz - Retro Geek | IzzDirectory | Proxy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 28-01-2007, 09:17 PM
dannyfoo's Avatar
Novice Webmaster
 
Join Date: Oct 2006
Location: Malaysia
Posts: 64
Rep Power: 27
dannyfoo is on a distinguished road
urm.. I'll try to find the file buchin was mentioning about when I temporarily use the k2 theme again...or install another WP somewhere on my server. :P

Hopefully can get it out this coming week.

Cheers.
__________________
Websites Made Simple is my Malaysia website design blog.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
What Is Your Favourite Wordpress Theme? limcs Blogging Discussion 16 29-04-2007 08:59 AM
Problem with Wordpress CSS kahsoon Website Design 0 20-04-2006 08:43 PM
my first wordpress blog.. Rezats Blogging Discussion 0 24-08-2005 02:11 AM
how to use plugin in wordpress Rezats Website Programming 3 19-08-2005 11:41 PM
about wordpress webber Website Programming 9 10-01-2005 10:18 PM


All times are GMT +8. The time now is 01:31 PM. Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.


WebmasterMalaysia.com is Proudly Hosted by Exabytes Semi Dedicated Server.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18