• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Placing Text Link Ads under Posts' titles

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Placing Text Link Ads under Posts' titles

This topic is: resolved

Tagged: Ads under titles of the posts

  • This topic has 10 replies, 2 voices, and was last updated 10 years, 5 months ago by Brad Dalton.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • April 28, 2013 at 11:55 am #38239
    Renu Bakshi
    Member

    I want to place Google Text Link Ads (size 468*15) just under titles of the posts only on posts' pages (Obviously  not on home page or any other pages).

    I am using Magazine child theme on wordpress.

    Please advise how I can do so?

    Thanks & Regards...........Renu

    April 28, 2013 at 12:25 pm #38244
    Brad Dalton
    Participant

    There are several ways to do this.

    A custom function is best with a conditional tag for single posts.

    Style using the single-title class generated by the custom function.

    Code not displaying? Grab it on Github.


    Tutorials for StudioPress Themes & WooCommerce.

    April 28, 2013 at 10:28 pm #38343
    Renu Bakshi
    Member

    Thanks Braddalton,

    Can Genesis Simple Hooks or any other plugin be used for this purpose. If yes, then which hook is to be used.

    Any other plugin which can be used for this purpose.

    Thanks & Regards............Renu

     

    April 28, 2013 at 11:19 pm #38344
    Brad Dalton
    Participant

    Sure. You can use the Genesis Simple Hooks plugin which pretty much does the same thing.

    Use the

     genesis_after_post_title

    with a conditional tag

    is_single

    Any reason you don't want to use the code i supplied as its the best option?


    Tutorials for StudioPress Themes & WooCommerce.

    April 29, 2013 at 12:09 am #38349
    Renu Bakshi
    Member

    Braddalton : Any reason you don’t want to use the code i supplied as its the best option?

     

    Me: I am not familiar with all these. So not confident in using it.

    April 29, 2013 at 12:14 am #38350
    Renu Bakshi
    Member

    Braddalton: What do you mean by - with a conditional tag: is _ single

    April 29, 2013 at 12:37 am #38354
    Brad Dalton
    Participant

    You can learn more about them here http://codex.wordpress.org/Conditional_Tags


    Tutorials for StudioPress Themes & WooCommerce.

    April 29, 2013 at 12:58 am #38359
    Renu Bakshi
    Member

    Thanks...........

    Where to put this conditional tag - "is_single"

    April 29, 2013 at 1:36 am #38361
    Brad Dalton
    Participant

    Try this Renu.

    Code not displaying? Grab it on Github.


    Tutorials for StudioPress Themes & WooCommerce.

    April 29, 2013 at 2:12 am #38365
    Renu Bakshi
    Member

    Braddalton: Thanks a lot.
    Please clear my three doubts:
    (i) I have to put this code: 

    if (is_single()) { ?><p>My Html ad code Here</p><?php}?> Am I correct. (ii) As I understand one should not change / amend google adsense codes, as this is against google adsense policies / terms. So adding conditional code as above does not mean changing / amending google adsense code. (iii) Placing link ad unit just under titles of the posts is not against google adsense terms / policies. Best Regards............Renu  

     

    April 29, 2013 at 2:26 am #38368
    Brad Dalton
    Participant

    Please link to your site Renu.

    The 2 code snippets i wrote for you will output your Adsense code in the after post title hook position on single posts only.

    Place your Adsense code between the p tags.

    Another way to do this is to add a custom widget after post titles and place a Adsense widget in that area. Please start a new thread if you want a solution for this and mark this one as resolved.

    Please refer to Google for questions on Adsense policies.


    Tutorials for StudioPress Themes & WooCommerce.

  • Author
    Posts
Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Placing Text Link Ads under Posts' titles’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble