WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Adsense in single.php twenty twelve. (6 posts)

  1. ejortol
    Member
    Posted 1 year ago #

    Hello. Turns Twenty Twelve theme has a single.php file something different from other subjects. From what I read in the forum this issue is resolved. They have done as follows: content.php file copied and have called post-content.php, File sigle.php changed
    <? Php get_template_part ('content', get_post_format ());?>
    By this other
    <? php get_template_part ('post-content', get_post_format ());?>
    and have placed the AdSense code in the post-content.php
    Anyway, I do not know where in the post-content.php file I have to put the adsense code to display below the post title. I hope I explained correctly.
    Thank you.

  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Are you using a child theme? You absolutely should not be modifying theme files, especially in a default theme.

    http://codex.wordpress.org/Child_Themes

  3. ejortol
    Member
    Posted 1 year ago #

    My knowledge is pretty basic. A little bit of everything. I do not intend to modify the default theme, but to create a new php file copying an existing one. The problem I have is that I do not know what part should I place the adsense code. All these I have found here:
    http://wordpress.org/support/topic/problem-adding-adsense-ads?replies=11
    I tried asking but a moderator told me to open a new discussion. Sorry for my English, I speak Spanish and use a translator.
    Thank you.

  4. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    You still need to use a child theme http://codex.wordpress.org/Child_Themes

    Have you looked at using a plugin for the Adsense?

    http://wordpress.org/extend/plugins/search.php?q=adsense

    (BTW, your English is fine :) - or the translator does a good job!)

  5. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    where in the post-content.php file I have to put the adsense code to display below the post title.

    possibly after this line (line 31):

    </header><!-- .entry-header -->
  6. ejortol
    Member
    Posted 1 year ago #

    Hello again. Alchymyth indications have worked perfectly. Is there, after line 31, where you have to place the adsense code to come out just below the post title. Thanks a million. I am happy to have received your support.
    Wpyogi On the other hand, I have enough on my wordpress plugin and I've read that overload the blog. So I try to use as little as possible. Moreover, so I'm learning more things.
    It was a pleasure to receive your help and I am very grateful.
    Sincerely,
    ejortol

Topic Closed

This topic has been closed to new replies.

About this Topic