• 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

Manuel

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
  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • November 30, 2015 at 4:31 pm in reply to: How to make responsive extreme long links #172289
    Manuel
    Member

    This is an example of what a want to make, but implemented in genesis...

    Handling Long Words and URLs (Forcing Breaks, Hyphenation, Ellipsis, etc)

    Thanks in Advanced

    May 27, 2015 at 10:04 am in reply to: Adding Third Party Asynchronous Scripts to Genesis #153832
    Manuel
    Member

    Copy and paste this code in the footer?

    (function(doc, script) {
               var js,
    	   fjs = doc.getElementsByTagName(script)[0],
    	   add = function(url, id) {
    	     if (doc.getElementById(id)) {return;}
    	     js = doc.createElement(script);
    	     js.src = url;
    	    id && (js.id = id);
    	     fjs.parentNode.insertBefore(js, fjs);
    	   };
    						 
    	   // Google Analytics
    	   add(('https:' == location.protocol ? '//ssl' : '//www') + '.google-analytics.com/ga.js', 'ga');
    	   // Google+ button
    	   add('https://apis.google.com/js/plusone.js');
    	   // Facebook SDK
    	   add('//connect.facebook.net/en_US/all.js', 'facebook-jssdk');
    	   // Twitter SDK
    	   add('//platform.twitter.com/widgets.js', 'twitter-wjs');
    	   // Pinterest
    	   add('//assets.pinterest.com/js/pinit.js');
    						
    	}(document, 'script'));

    Thanks in advanced

    January 18, 2014 at 8:27 pm in reply to: Add AdSense in Home After Second & Third Posts #85824
    Manuel
    Member

    Hi Pseric and Brandondalton, do you find the solution for this problem?, i have the same issue, it display in every post

    Thanks!

    July 14, 2013 at 9:24 pm in reply to: Add Adsense in Home only in the first post #50734
    Manuel
    Member

    Do you know where i cant find those variables to create that conditional, I already tried different conditionals, but without success.

    I know I need to insert the adsense code after the id="content", or only execute the code in the first post

    Brandon, Can you recommend me a tutorial where i can learn how to use the genesis framework, please!

    Thanks!

    May 13, 2013 at 11:37 am in reply to: Modify Date in Prose #40692
    Manuel
    Member

    Thank You wendycholbi and  braddalton, it works, i modify directly the locale.php.

     

    Thanks

    April 18, 2013 at 1:17 pm in reply to: Add Adsense to the final Content Post #36203
    Manuel
    Member

    I get it here , in the forum, you posted this code in another thread,I read past  posts to try to solve this problem,, I use this code:

    <code>

    add_filter( 'the_content', 'wpsites_adsense_middle_content' );
    function wpsites_adsense_middle_content( $content ) {
    if( !is_single() )
    return $content;

    $paragraphAfter = 0; //Enter paragraph number
    $content = explode ( "</p>", $content );
    $new_content = '';
    for ( $i = 0; $i < count ( $content ); $i ++ ) {
    if ( $i == $paragraphAfter ) {
    $new_content .= '<div style="width: 300px; height: 250px; padding: -5px -5px 0px 0; margin-right: 0;align=Top;display:inline-table;border:none;position:relative;float:left">';
    $new_content .= 'Adsense Code'
    $new_content .= '<center><strong>Enlace Patrocinado</strong></center></div>';
    }
    $new_content .= $content[$i] . "</p>";
    }
    return $new_content;
    }

    </code>

    I aslo  tied usging wp insert, but  I cant get   the position exactly where i want it, I  want to Add a 300x250 banner between the image and the  sharethis Bar, that the reason i want to add it always before the  last<p> tag.

     

    Thanks !!

     

    April 18, 2013 at 2:17 am in reply to: Add Adsense to the final Content Post #36094
    Manuel
    Member

    Thanks Brad it work great.

    I don't want to bother, but i get a little frustrated,   I tried  this  code, it works, but if the   post have photos or another element like a video it will avoid those elemnts, and the banner will be in another part

    <code>

    add_filter( 'the_content', 'wpsites_adsense_middle_content' );
    function wpsites_adsense_middle_content( $content ) {
    if( !is_single() )
    return $content;

    $paragraphAfter = count ( $content ); //Enter paragraph number
    $content = explode ( "</p>", $content );
    $new_content = '';
    for ( $i = 0; $i <= count ( $content ); $i ++ ) {
    if ( $i == $paragraphAfter ) {
    $new_content .= '<div style="width: 300px; height: 250px; padding: -5px -5px 0px 0; margin-right: 0;align=Top;display:inline-table;border:none;position:relative;float:left">';
    $new_content .= '<script type="text/javascript">Script Adsense</script>';
    $new_content .= '<center><strong>Enlace Patrocinado</strong></center></div>';
    }
    $new_content .= $content[$i] . "</p>";
    }
    return $new_content;
    }

    </code>

    Also i now that always  in the content I  have  the <p></p> tag element,  the last  <p> is the ShareThis pluggin, I want to add it before the last <p> tag,I know i can count the elements of a class, but I cant implemented, What could be the best for to count the elements tags in a class, or is a function of theme than give me that info?

    http://comodefinirabdominales.com/como-reducir-grasa-en-el-abdomen-sin-abandonar-la-rutina/

     

    April 17, 2013 at 5:32 pm in reply to: Add Adsense to the final Content Post #36025
    Manuel
    Member

    sorry, Also If you can help me with another issue, i need to add Adsense banner before the shareThis pluggin but in the home page, I get a little confused when I try to add the adsense.

    Here is the link of my website:

     

    http://comodefinirabdominales.com/

     

    Thanks

    Best Rewards!!

    April 17, 2013 at 11:32 am in reply to: Add Adsense to the final Content Post #35976
    Manuel
    Member

    Also I need to add a Adsense banner before the shareThis pluggin but in the home page.

     

    http://comodefinirabdominales.com/

     

    Thanks!

    April 17, 2013 at 11:20 am in reply to: Add Adsense to the final Content Post #35974
    Manuel
    Member

    Hi. Brad:

    Here is the link

     

    http://comodefinirabdominales.com/como-reducir-grasa-en-el-abdomen-sin-abandonar-la-rutina/

    I want to add it before the share bar.

     

    Thanks!

  • Author
    Posts
Viewing 10 posts - 1 through 10 (of 10 total)

CTA

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

Create a site with WP EngineShop for Themes

Footer

StudioPress

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