Please Read First
Troubleshooting Tips
Frequently Asked Questions
Before Posting Please Disable Wp Super Cache Plugin
When Posting Please Include Your URL.
Search Forum Using Google Search Box Above
Forum Video

Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Nov 2010
    Posts
    9
    Rep Power
    0

    Default Is there an easy way to add adsense to pages

    I ended up using pages instead of posts for one of my blogs....is there an easier way to add adsense to pages instead of individually posting it to each page (that's what I did)...i am talking of pages instead of posts...thanks

  2. #2
    Join Date
    Jun 2010
    Location
    Binghamton, NY
    Posts
    2,732
    Rep Power
    8

    Default

    The only other way in that situation is to stick to the leaderboard and text widgets in the sidebars.
    Lynn T. Harrison
    Ever Evolving Enterprises
    LynnTHarrison.com (my blog on using WordPress) Testimonials appreciated

  3. #3
    Join Date
    Mar 2012
    Posts
    27
    Rep Power
    0

    Default

    I want to do the same thing...have AdSense automatically inserted into pages.

    I can deal with having to manually insert them, but how do I set it up where the text wraps around the ad?

  4. #4
    Join Date
    Jan 2012
    Posts
    941
    Rep Power
    3

    Default

    Quote Originally Posted by tonyrovere View Post
    I want to do the same thing...have AdSense automatically inserted into pages.

    I can deal with having to manually insert them, but how do I set it up where the text wraps around the ad?
    Take a look at:

    http://www.erikvossman.com/2005/11/2...r-chitika-ads/

    I haven't tested it, but it looks like it could work.
    Leilani Clifford
    - Forum Admin

    ----------------------------
    We're building our Socrates Facebook community! Come visit us, and Like us to stay up to date on everything Socrates
    Facebook: http://www.facebook.com/socrateswptheme
    Twitter: http://www.twitter.com/socratestheme

  5. #5
    Join Date
    Jun 2010
    Location
    Maine
    Posts
    7,457
    Rep Power
    12

    Default

    Just goto

    Appearance > Editor > Index.php

    Locate this code

    <?php $topAd = get_option("socratesOptions");
    if(($topAd['inpostad1'] != '' && !is_page() && $inpost1counter<$topAd['inpostadmaxrepeat']) && !$custom_fields['_mcf_postDisableInPostAd'][0]) {
    if ($topAd['inpostposition'] != 'top'){
    echo '<div id="socratesinpostad" style="float:'.$topAd['inpostposition'].'; display:block; padding:5px; margin:0;">'.stripslashes($topAd['inpostad1']).'</div>';
    } else {
    echo '<div id="socratesinpostad" style="display:block; padding:5px; margin:0;">'.stripslashes($topAd['inpostad1']).'</div><br />';
    }
    $inpost1counter++;
    }
    ?>

    You see where it says !is_page

    Remove the exclamation point and save.

  6. #6
    Join Date
    Mar 2012
    Posts
    27
    Rep Power
    0

    Default

    Dan,

    Thanks for being proactive and answering so quickly.

    I tried out another solution I found online and it worked.

    All you need to do is use the code below...

    <div style="display:block;float:right;margin: 5px 5px 5px 5px;">
    [insert your code here]
    </div>

    That's it. I saw some other people asking this so perhaps you could pass it along.

    You have come up with a terrific theme. So thanks again.

    Warm regards,

    Tony Rovere

  7. #7
    Join Date
    Jun 2010
    Location
    Maine
    Posts
    7,457
    Rep Power
    12

    Default

    Tony,

    We have that same code on many posts in the forum as well.

    But if you use my mod, you never have to add it manually so it will be a big timesaver.

  8. #8
    Join Date
    Jan 2013
    Location
    Michigan
    Posts
    33
    Rep Power
    0

    Default

    Quote Originally Posted by Dan Nickerson View Post
    Just goto

    Appearance > Editor > Index.php

    Locate this code

    <?php $topAd = get_option("socratesOptions");
    if(($topAd['inpostad1'] != '' && !is_page() && $inpost1counter<$topAd['inpostadmaxrepeat']) && !$custom_fields['_mcf_postDisableInPostAd'][0]) {
    if ($topAd['inpostposition'] != 'top'){
    echo '<div id="socratesinpostad" style="float:'.$topAd['inpostposition'].'; display:block; padding:5px; margin:0;">'.stripslashes($topAd['inpostad1']).'</div>';
    } else {
    echo '<div id="socratesinpostad" style="display:block; padding:5px; margin:0;">'.stripslashes($topAd['inpostad1']).'</div><br />';
    }
    $inpost1counter++;
    }
    ?>

    You see where it says !is_page

    Remove the exclamation point and save.
    Hello,
    I am using the 7 day free trial and was trying this mod to add adsense to pages. Cant seem to get it to work by removing the !.
    Will this work on the free trial or just when I upgrade? Very happy with the theme. Thank you

  9. #9
    Join Date
    Jun 2010
    Location
    Maine
    Posts
    7,457
    Rep Power
    12

    Default

    It will work on the 7 day free trial. Make sure you pages aren't cached.

  10. #10
    Join Date
    Jan 2013
    Location
    Michigan
    Posts
    33
    Rep Power
    0

    Default

    Thanks for the reply. Will try again today.
    Just to make sure, it simply is just taking out the ! in the above code? and leaving is_ page.

Similar Threads

  1. How to Add Pages and Categories in Socrates Nav Panel
    By JimHunter in forum Official Support 3.0
    Replies: 8
    Last Post: 08-04-2011, 09:48 AM
  2. AdSense question for pages
    By danboy in forum Official Support 3.0
    Replies: 9
    Last Post: 05-20-2011, 09:02 PM
  3. Adsense not showing on certain pages
    By judyb in forum Official Support 3.0
    Replies: 3
    Last Post: 04-07-2011, 09:46 PM
  4. Unable to add new pages
    By BarbZ in forum Official Support 3.0
    Replies: 4
    Last Post: 08-24-2010, 03:41 AM
  5. When Creating Pages Do You Add The .html Extension?
    By ayman01 in forum Official Support 3.0
    Replies: 1
    Last Post: 07-19-2010, 03:12 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
  •