• Resolved AlgerieDeals

    (@algeriedeals)


    Hi,

    I tested the country block option with my own ALPHA-2 Country code but it did not work.

    Can you help please?

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter AlgerieDeals

    (@algeriedeals)

    Hi,

    Can you please check if there is something wrong with this code as the shortcode does not work?

    The code I’m actually using obviously includes my real ca-pub number

    Thank you.

    Code:

    add_shortcode( ‘ads_in_posts’, function() {
    if( aicp_can_see_ads() ) { // This part will show ads to your non-banned visitors
    $adCode = ‘<div class=”aicp”><!– Don\’t forget to add this div with aicp class –>

    <script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
    <!– Posts ads –>
    <ins class=”adsbygoogle”
    style=”display:inline-block;width:336px;height:280px”
    data-ad-client=”ca-pub-****************”
    data-ad-slot=”**********”>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
    </div><!– end of the aicp div –>’;
    return $adCode;
    }
    } );

    Plugin Author iSaumya

    (@isaumya)

    Hi I think you have having quote problem. I mean you are using these quotes in your code: ‘ ” etc.

    Whereas these would be ‘ ” etc. If possible, share your site link so that I can recconfirm it.

    Thread Starter AlgerieDeals

    (@algeriedeals)

    This is my site

    https://www.algerie.deals

    Thank you

    • This reply was modified 7 years, 11 months ago by AlgerieDeals.
    • This reply was modified 7 years, 11 months ago by AlgerieDeals.
    • This reply was modified 7 years, 11 months ago by AlgerieDeals.
    Plugin Author iSaumya

    (@isaumya)

    Sorry but your link is not opening: https://puu.sh/uUsL8/4ae70622b8.png

    Thread Starter AlgerieDeals

    (@algeriedeals)

    It works fine on my side.

    This is a URL on which I set up this shortcode [ads_in_posts].

    https://www.algerie.deals/top-5-des-marques-de-voitures-preferees-en-algerie-2016/

    Thanks

    • This reply was modified 7 years, 11 months ago by AlgerieDeals.
    Plugin Author iSaumya

    (@isaumya)

    You have added your code wrong. Check this: https://puu.sh/uUuGx/ce61169abb.jpg

    Thread Starter AlgerieDeals

    (@algeriedeals)

    Sorry but my coding skills are limited; I have used the code you provided on your demo page so what should the code look like please?

    Thread Starter AlgerieDeals

    (@algeriedeals)

    My coding skills are limited, I have used the code you provided on your demo page so what should the code look like? I will just remove the line you pointed to?

    Thread Starter AlgerieDeals

    (@algeriedeals)

    Sure I will

    Plugin Author iSaumya

    (@isaumya)

    I have fixed the mistake in your ad code and also added IN in the blocked country list to test things out and it is working perfectly fine as expected: https://puu.sh/uV4nk/e77f0cbad0.png

    https://puu.sh/uV4oj/486e94f51a.png

    Thread Starter AlgerieDeals

    (@algeriedeals)

    I have used a plugin to insert ads in posts and the shortcode works great! I don’t have to insert it in every single post, it also works in widgets for sidebar ads. The only thing left is the header, I will contact the theme developer for that.

    Thank you very much for your help.

    • This reply was modified 7 years, 11 months ago by AlgerieDeals.
    Plugin Author iSaumya

    (@isaumya)

    You are welcome ??

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Side note to @isaumya I’ve deleted your offer to login to your user’s site. I’m am 100% sure you mean well but please never ask for credentials on these forums.

    https://www.ads-software.com/support/guidelines/#the-bad-stuff

    Now for the why: The internet is a wonderful place full of very nice people and a few very bad ones. I’m sure everyone here is very nice however, by giving some ones keys to your house you are trusting they wont steal anything. Likewise the person who takes the keys is now responsible for the house FOREVER.

    If something was to go wrong, then you the author may well legally become liable for damages, which they would not normally have been as their software is provided without warranty.

    Please be aware that repeatedly asking for credentials will result in us asking you to repeatedly stop before escalating up to the plugins team.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Country block option will not work’ is closed to new replies.