Community Forums › Forums › Archived Forums › Design Tips and Tricks › Insert Adsense just below post title
Tagged: adsense
- This topic has 10 replies, 2 voices, and was last updated 10 years, 2 months ago by nutsandbolts.
-
AuthorPosts
-
February 18, 2014 at 10:33 am #90987jinsejoseMember
How and where to insert the adsense ad code to show it below post title, before the content starts. I'm new to this community.Somebody please help.
http://techbee.inFebruary 18, 2014 at 11:15 pm #91079nutsandboltsMemberDo you want it to show only on single posts?
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+February 19, 2014 at 12:37 am #91091jinsejoseMemberYes, to show ads only in single posts.
February 20, 2014 at 12:14 pm #91445nutsandboltsMemberThe easiest way to do this is to add a widget area below your post titles. You can do that by pasting the code from this link into your functions.php, which will give you a new area in Appearance > Widgets called Custom Widget Area where you can put your code into a text widget. Hope that helps!
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+February 20, 2014 at 8:15 pm #91525jinsejoseMemberI just created the custom widget as mentioned. And added the adsense 468*60 ad code to that. But, it is not yet displaying. Please help me out.
February 20, 2014 at 8:18 pm #91526nutsandboltsMemberI'm not seeing the widget area in your page source on a single post.... You may need to add some CSS to give it a width of 100% and relative position.
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+February 20, 2014 at 8:26 pm #91527nutsandboltsMemberI just noticed there are 3 Adsense blocks on the page already, which may be why it's not showing up. It's against the Adsense TOS to have more than 3. Have you tried just using a text widget with something like "testing" in it to see if it shows up?
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+February 21, 2014 at 1:12 pm #91747jinsejoseMemberI created a widget area below title with the help of the link that you provided. Thanks for all your support. The code is
genesis_register_sidebar( array(
'id' => 'after-title',
'name' => __( 'After Title', 'theme' ),
'description' => __( 'This is the after title widget area.', 'theme' ),
) );
add_action('genesis_entry_header', 'after_title_widget', 11 );
function after_title_widget() {
if ( is_singular( 'post' ) )
genesis_widget_area( 'after-title', array(
'before' => '<div class="after-title widget-area">',
'after' => '</div>',
) );}
After inserting adsense code, ad is now appearing. But, it's above title description.
"February 22, 2013 by JINSE JOSE 9 Comments (Edit)"
What changes should I make in the above code, so that it goes below title details.
Thanks in advance.February 21, 2014 at 1:13 pm #91748nutsandboltsMemberSee the 11 in the code above? Try changing it to 12, and if that doesn't work, try 15 or 16. That is the priority, and a bigger number means lower priority. Let me know if none of those work!
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+February 21, 2014 at 1:18 pm #91749jinsejoseMemberIndeed it worked for 12. Thank you Andrea Whitmer for your great support.
February 21, 2014 at 1:18 pm #91750nutsandboltsMemberNo problem! Glad I was able to help. I'm going to mark this topic as resolved but feel free to open a new one if you need help with anything else. 🙂
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+ -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.