Conversation
supportHallo together, I am very lucky with this Plugin and the related posts. In case that I also use the Google Adsense Advertisement on my Website I like bring them together. I like use the related posts directly after the content of my page (as you can see it currently here: https://www.waller-fangen.de/welcher-wallerhaken/ ) There are now 3 related posts and after them there is a Google Adsense Banner. Now I like to have this Google Adsense Banner between the first and the second related posts. Do you have any idea how I can make this? I will be very lucky to hear from you. Best regards Oli The page I need help with: [ log in to see the link]
Hello @oli89 This is a very specific case to your project, that would need some additional code. For example, including the following piece of code into the “footer.php” template file of the theme active on your website: <script> jQuery(window).on('load', function(){ jQuery('.cprp_items li:first').after('<li></li>').append( jQuery('.asa2_h_box_tpl') ); }); </script> and that’s all. Best regards.
Dear codepeople, thanks very much for your fast and helpfull answer. I have iclude the code now. By this I see, that you put the asa plugin insteat of the adsense code (installed with a html widget). In case of this I change the asa2_h_box_tpl to #custom_html-3, I hope this was right? So the new code is: <script> jQuery(window).on('load', function(){ jQuery('.cprp_items li:first').after('<li></li>').append( jQuery('#custom_html-3') ); }); </script> This looks now nearly good, the only problem is, that the adsense-box is now not on the life side. It looks like an under point of the relatet posts plugin. Can you please help me again? Best regards Oli
Hello @oli89 I’m sorry, but I don’t know what do you want exactly, our plugin does not include any adsense block. The code I sent you in the previous entry, takes the tags with the class name asa2_h_box_tpl , and move them between the first and second related post. If you don’t want move the tags with the class name: asa2_h_box_tpl (used in the code I sent you), you should use the selector corresponding to the tags you want to move really. Best regards.
Hello @codepeople , thanks for your answer. Your right, I have change the tags and use the tags of the adsense now, this works really good. The only Problem is the position of the adsensebanner now. I have upload you a picture with this problem and with an arrow to show what I mean here: place-of-adsensecode . Do you understand what I mean and can you please help me? Best regards Oli
Hello @oli89 I’ve checked your page from different browsers, and the ad-sense block is displaying properly. Look all of them below: Chrome: Firefox: Microsoft Edge: Internet Explorer: Opera: Safari: However, it is true the addsense block is being included into the <li></li> tags corresponding to the first related post. Please, edit your block of code as follows: <script> jQuery(window).on('load', function(){ jQuery('.cprp_items li:first').after('<li></li>'); jQuery('.cprp_items li:eq(1)').append( jQuery('#custom_html-3') ); }); </script> and that’s all. Best regards.
@codepeople thanks very much for your help. The banner look realy beautyfull now. Best regards
Hello @oli89 This is a very specific case to your project, that would need some additional code. For example, including the following piece of code into the “footer.php” template file of the theme active on your website: <script> jQuery(window).on('load', function(){ jQuery('.cprp_items li:first').after('<li></li>').append( jQuery('.asa2_h_box_tpl') ); }); </script> and that’s all. Best regards.
Dear codepeople, thanks very much for your fast and helpfull answer. I have iclude the code now. By this I see, that you put the asa plugin insteat of the adsense code (installed with a html widget). In case of this I change the asa2_h_box_tpl to #custom_html-3, I hope this was right? So the new code is: <script> jQuery(window).on('load', function(){ jQuery('.cprp_items li:first').after('<li></li>').append( jQuery('#custom_html-3') ); }); </script> This looks now nearly good, the only problem is, that the adsense-box is now not on the life side. It looks like an under point of the relatet posts plugin. Can you please help me again? Best regards Oli
Hello @oli89 I’m sorry, but I don’t know what do you want exactly, our plugin does not include any adsense block. The code I sent you in the previous entry, takes the tags with the class name asa2_h_box_tpl , and move them between the first and second related post. If you don’t want move the tags with the class name: asa2_h_box_tpl (used in the code I sent you), you should use the selector corresponding to the tags you want to move really. Best regards.
Hello @codepeople , thanks for your answer. Your right, I have change the tags and use the tags of the adsense now, this works really good. The only Problem is the position of the adsensebanner now. I have upload you a picture with this problem and with an arrow to show what I mean here: place-of-adsensecode . Do you understand what I mean and can you please help me? Best regards Oli
Hello @oli89 I’ve checked your page from different browsers, and the ad-sense block is displaying properly. Look all of them below: Chrome: Firefox: Microsoft Edge: Internet Explorer: Opera: Safari: However, it is true the addsense block is being included into the <li></li> tags corresponding to the first related post. Please, edit your block of code as follows: <script> jQuery(window).on('load', function(){ jQuery('.cprp_items li:first').after('<li></li>'); jQuery('.cprp_items li:eq(1)').append( jQuery('#custom_html-3') ); }); </script> and that’s all. Best regards.
@codepeople thanks very much for your help. The banner look realy beautyfull now. Best regards