Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author iSaumya

    (@isaumya)

    The code seems wrong. Please check the plugin description page for the example shortcode code. Then place edit that code and replace your ad code with the dummy ad code provided in the example shortcode script. Place the code in your functions.php and then use the shortcode.

    Thread Starter tomstrom

    (@tomstrom)

    I think I got the code working, and confirmed the same results with your sample code. When the code works my page won’t load. I get this error in both the preview window of Ad Inserter and on the actual web page (when I attempt to put the code in a shortcode window):
    “There has been a critical error on this website.”
    Regarding putting it into functions.php, when I use “add_shortcode( ‘your_shortcode_name’, function() {” (and give it an actual name), I get the same error where the web page won’t load.

    I’m not a coder, but it’s almost like it’s not finding “aicp_can_see_ads” and breaking whenever php is working. That is, regardless of whether I use the sample code or my own code.

    Since this is working for everyone else, I’m beginning to wonder if it’s a problem with my Theme (NewsAnchor by aThemes). But I don’t know how to figure that out, either 😉

    Plugin Author iSaumya

    (@isaumya)

    It seems there is some mistake in your PHP code

    Thread Starter tomstrom

    (@tomstrom)

    Remember that I also tried using your sample PHP code. When the code works, the site goes down. When there’s a mistake in the code that prevents it from being executed, the site stays up.

    That’s why I was considering that I may have a broken theme.

    Plugin Author iSaumya

    (@isaumya)

    Where are you putting the code and how you are using it? Try making a loom screen recording and share that.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘My Shortcode Is Showing’ is closed to new replies.