Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #892229
    Alex Jones
    Participant

    Hi,

    I added a RAW element to my cornerstone page (http://rubymusic.ie/the-battles-of-winter/) with an Adsense generated code.
    The ad is not showing, only this snippet: (adsbygoogle = window.adsbygoogle || []).push({});

    Am I missing something?

    Thanks.

    #893070
    Friech
    Moderator

    Hi There,

    Thanks for writing in! Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #894206
    Alex Jones
    Participant
    This reply has been marked as private.
    #895013
    Rue Nel
    Moderator

    Hello There,

    Thanks for providing the information. From the looks of it, you may have inserted an invalid Adsense code. It is possible that you post the complete ad code in your next reply? To know more how you can insert the adsense code, please check out this link:
    https://support.google.com/adsense/answer/181947?hl=en&ref_topic=28893&rd=1
    https://support.google.com/adsense/answer/9999

    Hope this helps.

    #895257
    Alex Jones
    Participant
    This reply has been marked as private.
    #895432
    Alex Jones
    Participant

    Hello,

    Once I place the full ad code (displayed in the post above) in the RAW element and save the page, for some reason the code changes to this:

    <!– TBOW –>
    <ins class=”adsbygoogle”></ins>

    (adsbygoogle = window.adsbygoogle || []).push({});

    What’s going on?

    Thanks!

    #896237
    Rad
    Moderator

    Hi there,

    It’s an old bug which already fixed on the recent version of X and cornerstone. Would you mind updating your theme and cornerstone first?

    Or please try the text element instead of raw element.

    Thanks!

    #896712
    Alex Jones
    Participant

    Hello, thanks for your reply.
    I tried using the text element instead of the raw element but got to the same bug.
    The guy who installed the x-theme did not use a child theme. If I update the theme and cornerstone at this point, will there be any formatting loss?
    Thanks.

    #897400
    Thai
    Moderator

    Hi Alex,

    If you didn’t make any changes from the templates file in the parent theme, your data would be safe 🙂

    Regards!

    #900350
    Alex Jones
    Participant

    Hey guys, everything got updated but I am still facing the same bug (http://rubymusic.ie/the-battles-of-winter/).
    The ad code gets cut when I save the page, so the ad does not display correctly on my page.
    Am I missing something? I’d ask you for some kind of urgency helping me solve this issue, please.
    Thanks.

    #901567
    Rupok
    Member

    Hi @alex-jones

    It seems your code was not added properly as I can see the code on front-end – http://prntscr.com/axddca

    Kindly check and make sure you have added this correctly.

    Cheers!

    #901723
    Alex Jones
    Participant

    Hello Rupok,

    Once I place the correct ad code (copied and pasted from the adsense site) in the RAW element and click save, for some reason the code changes. I have also tried using the Text element and got the same result. I have updated WP, X-Theme and cornerstone, as someone on a previous post said it was a bug from an older version, it is still not working.

    I have posted the full ad code here for you guys to check that I am not using the wrong code. It’s already been more than a week trying to figure out the problem, would you please help me out here!

    Thanks and hope to hear from you really soon.

    #902719
    Alexander
    Keymaster

    Hey Alex,

    I logged in and noticed this was a multisite installation. By default, Administrators on multisite can’t add script tags because it is a security concern for the network. WordPress manages this permission with the unfiltered_html capability. For more information on what restrictions are in effect, take a look here: https://codex.wordpress.org/Roles_and_Capabilities#unfiltered_html

    Cornerstone enforces when users don’t have the unfiltered_html capability similar to how WordPress does by stripping out potentially dangerous HTML like script tags. You can also see this in effect by going to the Settings pane while editing a page, and clicking Custom JS.

    To make this work, you’ll need to add unfiltered_html to the Administrator role, which can be done with custom code or a plugin. There’s a plugin managed by Automattic to add this functionality back to site administrators, but it hasn’t been updated in a while, and I don’t know if it still works. (https://wordpress.org/plugins/unfiltered-mu/)

    I’m sorry that we weren’t able to bring this to your attention any sooner. Hopefully this helps you get to the bottom of things here.

    #902805
    Alex Jones
    Participant

    Thanks for the quick response Alexander.
    Would the “Super Admin” user be able to add the Adsense script and have it working?

    #903657
    Rad
    Moderator

    Hi there,

    As long as the super admin has the capability of unfiltered_html, then it should work. You may also try other plugins that will allow you to assign capability.

    Thanks!

  • <script> jQuery(function($){ $("#no-reply-892229 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>