• Resolved ejortol

    (@ejortol)


    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • WPyogi

    (@wpyogi)

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

    https://codex.www.ads-software.com/Child_Themes

    Thread Starter ejortol

    (@ejortol)

    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:
    https://www.ads-software.com/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.

    WPyogi

    (@wpyogi)

    You still need to use a child theme https://codex.www.ads-software.com/Child_Themes

    Have you looked at using a plugin for the Adsense?

    https://www.ads-software.com/extend/plugins/search.php?q=adsense

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

    Michael

    (@alchymyth)

    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 -->

    Thread Starter ejortol

    (@ejortol)

    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

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Adsense in single.php twenty twelve.’ is closed to new replies.