Page 4 of 9 FirstFirst ... 2 3 4 5 6 ... LastLast
Results 46 to 60 of 123

Thread: Wordpress Dicussion

  1. #46
    Join Date
    Jul 2006
    Location
    LittlePenang.com
    Posts
    1,778
    Rep Power
    202
    iamfreelancer, probably can have a test with ur way... just have a try...

    by the way, let me show my index coding here
    HTML Code:
    <?php get_header(); ?>
    
    <center>
    <div>
    <!-- SiteSearch Google -->
    ...
    <!-- END SiteSearch Google -->
    </div>
    </center>
    
    <div id="contentwrap">
    
    <!--Google Adsense Text Link-->
    <center>
    <div>
    ...
    </div>
    </center>
    <!--End Google Adsense Text Link-->
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <!-- [entry] -->
    	<div class="entry">
    		<h3 <?php if (is_page()) echo 'style="margin-bottom: 20px;" ' ?>class="entrytitle" id="post-<?php the_ID(); ?>"><a title="Article-Link (Permalink)" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a> <?php edit_post_link('<img class="editpost" alt="Edit" src="' . get_bloginfo('template_directory') . '/images/edit.gif" />', '', ''); ?></h3>
    <!-- [entrymeta1] -->
    		<div class="entrymeta1">
    		<?php
    		if (! is_page()) {	// Do not display if we are on a page
    			// Date and author
    			if (is_single()) { $articledate = get_the_time('j. F Y, G:i') . ' Uhr'; } else { $articledate = get_the_time('j. F Y'); }
    			echo '<span class="meta-time">' . $articledate . '</span><span class="meta-category">'; the_category(', '); echo '</span><span class="meta-author"><a title="author" href="'; the_author_url(); echo '">'; the_author(); echo '</a></span>';
    			// Comments link
    
    			comments_popup_link('<span class="meta-comments">0 comments</span>', '<span class="meta-comments">1 comment</span>', '<span class="meta-comments">% comments</span>');
    		} // ! is_page()
    		?>
    		</div>
    <!--End [entrymeta1] -->
    
    <!-- [entrybody] -->
    		<div class="entrybody">
    			<?php the_content(__('Read more &raquo;'));?>
    		</div>
    
    
    
    
    
    
    		<!--My ads are here -->
    		<div>
                              My coding
                              </div>
    		<!--End-->
    
    
    
    
    
    
    
    <!--End [entrybody] -->
    		<?php if (is_single()) { ?>
    <!-- [entrymeta2] -->
    		<div class="entrymeta2">
    		<ul>
    		<?php
    		// *** Trackback URI: only if ping is enabled
    		if ( pings_open() ) { ?>
    			<li><a class="trackback-leftalign" title="Trackback-URL for '<?php the_title() ?>'" href="<?php trackback_url() ?>" rel="nofollow">Trackback-URL</a></li>
    <?php   }
    		?>
    		<?php
    		// *** RSS Comments: only if comments are enabled
    		if ( comments_open() ) { ?>
    			<li class="feed-leftalign"><span title="Subscribe to comments feed"><?php comments_rss_link('comments feed for this post') ?></span></li>
    <?php	}
    		?>
    		<?php
    		// *** Tags: only if there is any
    		if ( (function_exists('UTW_ShowTagsForCurrentPost')) ) { ?>
    		    <li class="utwtags"><span title="tags"><?php UTW_ShowTagsForCurrentPost("commalist") ?></span></li>
    <?php   }
    		?>
    		</ul>
    		</div>
    <!--End [entrymeta2] -->
    		<?php comments_template(); // Get wp-comments.php template ?>
    		<?php } // is_single() ?>
        <!--
    	<?php trackback_rdf(); ?>
    	-->
      </div>
    <!--END [entry] -->
      <?php endwhile; else: ?>
      <p><?php _e('No Entries found.'); ?></p>
      <?php endif; ?>
      <p><?php posts_nav_link('  ', __('&laquo; Previous Page'), __('Next Page &raquo;')); ?></p>
    </div>
    
    <!-- [contentwrap] -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    i have add my adsense code at the centre there
    HTML Code:
    <!--My ads are here -->
    		<div>
                              My coding
                              </div>
    		<!--End-->
    feel free to review the original page appreciate if some one can giv me some clue
    I blog IT Engineer LIFE at iCalvyn.com

    DreamNetwork If you don't mind Pirated

  2. #47
    Join Date
    Sep 2005
    Location
    in my body lar...
    Posts
    1,325
    Rep Power
    0
    where you wanted adsense ads to appear in? on the top / bottom/ middle of the first post?

    Top - before the first post title
    Middile - in between contents
    Botton - before/after read more links and before comments

    honestly i haven't done this... but i can give it a try.....

  3. #48
    Join Date
    Sep 2005
    Location
    in my body lar...
    Posts
    1,325
    Rep Power
    0
    ok... in the middle of my dragon(a.k.a smoking) break... an idea come to my head. it a little cheap solutions but i think solve the problem.

    the problem is you want to limit the adsense on your index page and the way to do this is to count how many times an ads have been display. the logic are as below:

    Step 1. create a var to act as a counter
    Step 2. before displaying the ad.. just check the counter against the the max ads to display variable.


    Step 1: before the header include put in the below code.
    PHP Code:
    <?
    $var_AdsenseCount 
    1;
    $var_AdsenseMaxAds2Show 2;
    ?>
    $var_AdsenseCount - this is the counter shall start with 1
    $var_AdsenseMaxAds2Show - this is the max number of ads to show. if you wan to show only 1 ad block then you can set it to 1


    Step 2: on your body/content where you want to display the ads put in the below code.

    PHP Code:
    <!-- START MY ADSENSE CODE-->
    <?php
     
    if ($var_AdsenseCount<=$var_AdsenseMaxAds2Show)
      {
      
    ?>
         ////copy and paste your adsense script code here////

      <?php
      $var_AdsenseCount 
    $var_AdsenseCount 1;
      }
    ?>
    <!-- END MY ADSENSE CODE-->
    i implemented on one of my customer blog at the url below. i have set it to display 2 ads block at the index page..

    view--> Wills or Last Wills and Testament, Estate Planning, Financial Planning and Investment Guide Blog

    hope the above could help.... if not .... let me know.... maybe i can dig further into wordpress code for you....
    Last edited by iamfreelancer; 14-05-2007 at 12:29 PM.

  4. #49
    Join Date
    Jul 2006
    Location
    LittlePenang.com
    Posts
    1,778
    Rep Power
    202
    Your coding are work, after i key in, it able to display 1 adsense in my latest post, and the sidebar adsense are comming out...

    1st thing is the loading of main page look like slow, and 2nd is scew up my sidebar, whole sidebar goes under the bottom of content... do u got any idea?
    I blog IT Engineer LIFE at iCalvyn.com

    DreamNetwork If you don't mind Pirated

  5. #50
    Join Date
    Sep 2005
    Location
    in my body lar...
    Posts
    1,325
    Rep Power
    0
    Quote Originally Posted by calvynlee View Post
    Your coding are work, after i key in, it able to display 1 adsense in my latest post, and the sidebar adsense are comming out...

    1st thing is the loading of main page look like slow, and 2nd is scew up my sidebar, whole sidebar goes under the bottom of content... do u got any idea?
    i'm not that sure about the slow loading part. maybe some of you affliate site/adsense site are slow...

    i think you must have inserted the adsense code into a wrong section of the php coding or some "<div>" code that interfere with it. try not to use any "<div>" in your custom code and make sure that it don't break any of the condition/looping code like "if...else" or "while...endwhile"..

    I experience this before when i trying it out in my wordpress index.php also. The sidebar gone haywire and sometime the whole page is blank. after i find the right spot to insert the code, it work fine again. I guess you need todo more testing on this.

    the below is my index.php code.. maybe you can have a look and compare to your one.

    PHP Code:
    <!-- START: IAMFREELANCER CODE -->
    <?
    $var_AdsenseCount 
    1;
    $var_AdsenseMaxAds2Show 2;
    ?>
    <!-- END: IAMFREELANCER CODE -->

    <?php get_header(); ?>

        <div id="content" class="narrowcolumn">

        <?php if (have_posts()) : ?>

            <?php while (have_posts()) : the_post(); ?>

                <div class="post" id="post-<?php the_ID(); ?>">
                    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
                    <small><?php the_time('F jS, Y'?> <!-- by <?php the_author() ?> --></small>

                    <div class="entry">
                        <?php the_content('Read the rest of this entry &raquo;'); ?>
                    </div>
                    
    <!-- START: IAMFREELANCER CODE-->
    <?php
     
    if ($var_AdsenseCount<=$var_AdsenseMaxAds2Show)
      {
      
    ?>

       <!-- PASTE YOUR ADSENSE CODE HERE -->
       <!-- PASTE YOUR ADSENSE CODE HERE -->
     
      <?php
      $var_AdsenseCount 
    $var_AdsenseCount 1;
      }
    ?>
    <!-- END: IAMFREELANCER CODE-->

                    <p class="postmetadata">Posted in <?php the_category(', '?> | <?php edit_post_link('Edit'''' | '); ?>  <?php comments_popup_link('No Comments ''1 Comment ''% Comments '); ?></p>
                </div>

            <?php endwhile; ?>

            <div class="navigation">
                <div class="alignleft"><?php next_posts_link('&laquo; Previous Entries'?></div>
                <div class="alignright"><?php previous_posts_link('Next Entries &raquo;'?></div>
            </div>

        <?php else : ?>

            <h2 class="center">Not Found</h2>
            <p class="center">Sorry, but you are looking for something that isn't here.</p>
            <?php include (TEMPLATEPATH "/searchform.php"); ?>

        <?php endif; ?>

        </div>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>
    by the way i notice your adsense code look different abit from the one that generated by google... your one got line spacing in between the code.. try not to touch any of the google code. use the exact code generated from adsense acc page.
    Last edited by iamfreelancer; 15-05-2007 at 11:07 AM. Reason: typo mistake

  6. #51
    Join Date
    Jul 2006
    Location
    LittlePenang.com
    Posts
    1,778
    Rep Power
    202
    thank for ur coding, it can run d... i didn add in the DIV, so the layout didn screw up... appreciate it

    i didn edit my adsense code ahr...just copy and paste only...

    wanna to giv u a rep, system said cannot, ask me to spread some where else 1st before giv u...i think i hv add u a rep in my last give... sad...
    I blog IT Engineer LIFE at iCalvyn.com

    DreamNetwork If you don't mind Pirated

  7. #52
    Join Date
    Sep 2005
    Location
    in my body lar...
    Posts
    1,325
    Rep Power
    0
    Quote Originally Posted by calvynlee View Post
    thank for ur coding, it can run d... i didn add in the DIV, so the layout didn screw up... appreciate it

    i didn edit my adsense code ahr...just copy and paste only...

    wanna to giv u a rep, system said cannot, ask me to spread some where else 1st before giv u...i think i hv add u a rep in my last give... sad...
    never mind bout the rep thingi.. noting important on that...

    i just glad that it could solve the problemo.... and i also learn a few more php syntax also while looking at the wp codes....

  8. #53
    Join Date
    Jan 2007
    Location
    Petaling Jaya
    Posts
    867
    Rep Power
    178
    true man, sometimes when helping others will gain ourselves some knowledge as well!

    btw, loading slow sometimes will happen for google ads, coz of the syndicating. it happens to all other affiliate ads and stuffs. Once u put them up, u will have to b prepare on any slow loading issue

  9. #54
    Join Date
    Jul 2006
    Location
    LittlePenang.com
    Posts
    1,778
    Rep Power
    202
    ya..yip, u are right, previously i just put those ads and aff at sidebar, the index load fast and sidebar followed, now index also hv literbit slow
    I blog IT Engineer LIFE at iCalvyn.com

    DreamNetwork If you don't mind Pirated

  10. #55
    Join Date
    Jul 2006
    Location
    LittlePenang.com
    Posts
    1,778
    Rep Power
    202
    Hi guys...is me again...always hv question to ask...

    currently i just add a youtube video at my blog - Pirated of Caribbean III, with this code
    HTML Code:
    <embed src="http://www.youtube.com/v/PetrAmq9fcw" style="width: 550px; height: 350px"></embed>
    but i have no idea when i want to add another youtube video in another new post - How to start a blog at Blogger.com with the code that i use above..it cant be apear..i have no idea, any once can advice?
    I blog IT Engineer LIFE at iCalvyn.com

    DreamNetwork If you don't mind Pirated

  11. #56
    Join Date
    Apr 2004
    Location
    Miri, Sarawak
    Posts
    93
    Rep Power
    194
    Oh, looks like you got your adsense help from here

    Make sure you copied the codes 100% the same given at the youtube's website. Looking at the code you pasted here, it seems like you didn't copy the code directly from youtube's site.
    Don't Ask Me Why I Joined This Forum
    GeminiGeek's Online Journal

  12. #57
    Join Date
    Jul 2006
    Location
    LittlePenang.com
    Posts
    1,778
    Rep Power
    202
    Quote Originally Posted by GeminiGeek View Post
    Oh, looks like you got your adsense help from here

    Make sure you copied the codes 100% the same given at the youtube's website. Looking at the code you pasted here, it seems like you didn't copy the code directly from youtube's site.
    the code i paste there are previous post code, that 1 works..

    this is the code that does word
    HTML Code:
    <p><embed src="http://www.youtube.com/watch?v=bU4gXHkejMo" style="width: 550px; height: 350px"></embed></p>
    I blog IT Engineer LIFE at iCalvyn.com

    DreamNetwork If you don't mind Pirated

  13. #58
    Join Date
    Jan 2007
    Location
    Petaling Jaya
    Posts
    867
    Rep Power
    178
    calyvnlee, so solve the problem already?

  14. #59
    Join Date
    Jul 2006
    Location
    LittlePenang.com
    Posts
    1,778
    Rep Power
    202
    Yip,
    Nope...still the same, how i modify the code also same. no video comming out...

    may be see future whether still hv any Youtube video have this problem ornot...

    By the way, limcs has giv me some idea to change the permalink, after i change it, it is able to have my post name after my URL..such as blog.icalvyn.com/mylist , but when back to
    blog.icalvyn.com/p=50 it unable to display, can it be both addreses also able to access

    Quote Originally Posted by limcs View Post
    Options -> Permalink.

    Put this under "Custom Structure"

    /%postname%/
    I blog IT Engineer LIFE at iCalvyn.com

    DreamNetwork If you don't mind Pirated

  15. #60
    Join Date
    Sep 2005
    Location
    in my body lar...
    Posts
    1,325
    Rep Power
    0
    Quote Originally Posted by calvynlee View Post
    By the way, limcs has giv me some idea to change the permalink, after i change it, it is able to have my post name after my URL..such as blog.icalvyn.com/mylist , but when back to
    blog.icalvyn.com/p=50 it unable to display, can it be both addreses also able to access
    if i not mistaken, you can have either one of the two only..... but anyway you can search on wordpress.org for some solutions there...

Page 4 of 9 FirstFirst ... 2 3 4 5 6 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Light-News-Blue Wordpress Theme :: Free WordPress Theme
    By moaid123 in forum Blogging Discussion
    Replies: 0
    Last Post: 14-12-2009, 01:20 AM
  2. Replies: 1
    Last Post: 24-09-2009, 10:30 AM
  3. Replies: 0
    Last Post: 30-06-2009, 06:26 AM
  4. Joomla CMS Dicussion
    By calvynlee in forum Mamak Stall
    Replies: 21
    Last Post: 22-06-2007, 03:08 PM
  5. OS Commerce System Dicussion
    By calvynlee in forum Mamak Stall
    Replies: 24
    Last Post: 28-01-2007, 04:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search Engine Optimization by vBSEO 3.5.0 RC1 PL1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112