• I’d like to add an Adrotate shortcode to the slider in order to display Adsense ads. Unfortunately, it doesn’t work. The slideshow shows the full text, e.g. [adrotate banner=”584″], but the code is not executed.

    As an alternative, I tried to insert the Adsense script on its own into the slide, but again no joy. Again, just the text of the script is displayed.

    Is there a solution to get around it?

    Thanks!

    https://wordpress.org/plugins/slideshow-jquery-image-gallery/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi Soccerwidow, that is an option that Stefan Boonstra the plugin author will advice you further.

    Regards

    Plugin Author Stefan Boonstra

    (@stefanboonstra)

    Shortcodes, JavaScript code, HTML IFrames and some HTML tags are disabled in the slideshow plugin to protect visitors of your website against security vulnerabilities like cross site scripting. This is why you’re seeing the text of your script rather than seeing your script being executed.

    Thread Starter Soccerwidow

    (@soccerwidow)

    Hi Stefan, thanks for your swift reply. Is there a way round it?

    I’d like to use your slider for proper presentations of various educational topics, but add a few Adsense ads now and between to pay for my efforts.

    Plugin Author Stefan Boonstra

    (@stefanboonstra)

    The simplest way to get around the slideshow’s security measures without compromising your website’s security, is to put your Adsense code right into the code of the slideshow plugin. This requires some knowledge of PHP though.

    I think the text slide is most suitable for showing Adsense ads, so open the ‘frontend_text.php’ file in your website’s ‘/wp-content/plugins/slideshow-jquery-image-gallery/views/SlideshowPluginSlideshowSlide/’ folder. Replace line 19 in this file (which starts with $description) with the following:

    $description = 'your_adsense_code_here';

    When adding a text slide to your slideshow it will now always show your Adsense add. If you need text slides for other purposes than showing ads, you might want to add a check to see if the text slide is empty:

    if (strlen($description) <= 0 && strlen($title) <= 0)
    {
        /* Show Adsense ad */
    }
    else
    {
        /* Show text slide content (place the original line 19 code here) */
    }
    Thread Starter Soccerwidow

    (@soccerwidow)

    Hi Stefan,

    thanks a bunch!

    I’ll play a little with the coding, and once I have worked it out (what may take a while I must admit) I’ll publish the code here for other people to use.

    Great plugin by the way. I like it. 🙂

    Plugin Author Stefan Boonstra

    (@stefanboonstra)

    Thanks! No problem. Please keep in mind that updating the slideshow plugin will undo any changes you’ve made to the slideshow plugin’s code.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Add Adrotate shortcode in slider’ is closed to new replies.