Forum Replies Created
-
AuthorPosts
-
ManuelMember
This is an example of what a want to make, but implemented in genesis...
https://css-tricks.com/snippets/css/prevent-long-urls-from-breaking-out-of-container/
Thanks in Advanced
ManuelMemberCopy 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
ManuelMemberHi Pseric and Brandondalton, do you find the solution for this problem?, i have the same issue, it display in every post
Thanks!
ManuelMemberDo 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!
ManuelMemberManuelMemberI 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 !!
ManuelMemberThanks 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/
ManuelMembersorry, 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!!
ManuelMemberAlso I need to add a Adsense banner before the shareThis pluggin but in the home page.
http://comodefinirabdominales.com/
Thanks!
ManuelMemberHi. 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!
-
AuthorPosts