How to implement a template tag

  • esiebert7625


    I’m using a new ad plug-in and want to implement a top layer ad which resides below the menu bar on top of the main post area. The way the ad plug-in does it is using something called template tags and of course they don’t show you how to do it. Here is there definition of this:

    Template tag If you want to use this ad zone on a fixed place inside your website, you can use this Template tag. Just copy the function into your website template, there where you want to show the banners.

    Here is there shortcode for it:

    <?php echo do_shortcode("[pro_ad_display_adzone id=6628]"); ?>

    Is there a graphene option somewhere where I would put this to make it work, the plug-in I’m using is called WP PRO Advertising System



    Here’s more info on their template tag, appreciate the help…

    The “template tag” is the solution to add adzones to places on your website where you can’t use shortcodes or widgets. It allows you to hardcode the adzone into your theme files on the exact location where you want the adzone to be.

    You can find the template tag for each adzone in the advertising menu under Adzones -> Get Code -> Template Tag.

    If you don’t know how to add the template tag into your theme files contact your theme developer, provide him the template tag and ask where it should be added to show the adzone where you want it to be.


    Kenneth John Odle

    Is there a graphene option somewhere where I would put this to make it work

    You can try using a Graphene action hook widget area.

    Since this code is PHP, you will also need to use a PHP widget plugin. Normal text widgets will only accept text, html, and css.

    Activate the widget area, go to the widgets pane, and add a PHP widget to your widget area. Save, and then view your page.

    There is a tutorial on my blog that goes into more detail. It’s a bit dated, but the information is still valid:

    If none of the widget areas are where you want to place this code, you will need to create a child theme, copy over the theme template file where you want to add the code, and insert the code into that file. But Graphene has so many widget areas that I’m fairly certain one of those will work for you.



    Thanks Ken that worked beautifully, I tried a few different areas and finally graphene_top_content did the trick. The ad is perfectly positioned above my content without extending into the sidebar. You can see it here.

    Some many great options in this theme, I appreciate the support.




    Kenneth John Odle


    Glad it worked for you. Cheers!

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

  • You must be logged in to reply to this topic.
Graphene Themes Forum