Adsense-Options – possible to use php-code or widget-shortcodes?

  • Hendryk


    Hi there,

    I very much like the theme-option of Graphene to insert ads at the end of posts. On my Website I want to use adsense AND amazon ads. The amazon ads are (in my case) often more content-related.

    Through the Theme-Options I can insert the Adsense-Code, it all works like a charm. Also it is possible (I just tried), to use the amazon-ad codes instead.

    What I now wanted to do is to use a plugin (Datafeedr Random Ads, ) to make this a little bit more random ;-). The result would be that on one page the adsense ads would appear, on the next page the amazon ads.

    Though, I realized this seems not to be possible. The Datafeedr-Plugin offers a PHP-Shortcode to insert the actual ad code chosen randomly.

    Example Code:

    [BBcode]<?php if (function_exists(‘dfrads’)) { echo dfrads(‘3928984’); } ?>[/BBcode]

    If I enter this code in the Adsense-Code area in the theme settings, the code will be truncated. No ads are displayed. I guess that PHP-Code in that field is not allowed?

    I then tried to use a shortcode like

    [do_widget id=text-8″]

    that can display widgets within posts or pages, as I can also just generate a widget with random ads. It turned out that this also does not seem to work – I only get the shortcode I entered, displayed as plain text.

    [strong]Would it be somehow possible to enable PHP-Code for the adsense-settings-field? Or support for shortcodes provided by another plugin?[/strong]

Viewing 1 post (of 1 total)

  • You must be logged in to reply to this topic.