We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now


joomla query

Medium Priority
Last Modified: 2012-06-27
i am new to this site..
and really i have learnt a lot from it...

i am working with a joomla programmer..
but we are stuck in between...
we are getting confused as to how to add advertisements at the top of the joomla site above header...

i hope some 1 can give me appropriate coding for that
Watch Question

Luis Clara FernandesBusiness Analyst

Only plugins could add entries to the header.  Look one of this plugins  and see how to do it.
I hope it helps.
Luis C. Fernandes


thnx clarafer i'l check it...
and then accept it as a solution :p


but this is a paid plugin..
can any 1 get me a free plugin...
Luis Clara FernandesBusiness Analyst

I downloaded for you. But this is a plugin that could shows you how to add entries in your joomla header.
Luis Clara FernandesBusiness Analyst

I could upload php files, but there is the code your concerned

//Joomla restrict
defined( '_JEXEC' ) or die( 'Restricted access' );
//Get mainframe
$mainframe->registerEvent( 'onPrepareContent', 'pluginBWgoogleverifiedplugin' );
//Insert meta tag in header

Open in new window


hii clarafer..
thnx for helping..
but by using this code i am unable to add advertisement at the top of the site
None of the previous comments apply. It sounds as though you wish to create a module position within the template. Once youve designated where this new position loads,  you can either publish to this position using an "ad" module, or simply use a custom html module containing your HTML.

In order to best clearly answer your question, I would need to know your Joomla version (J1.x and J1.5 version have different methods for loading modules) - your default template would also be helpful so we dont create a module which already exists.

There also exists different methods for hiding these modules when not in use, but if you intend on having this module (ad) display on all pages, that shouldnt be a concern.

Finally, there are parameters that allow you to set how you would like your modules to display, but keeping it simply, ill show you the minimalist methods

So in a nutshell:

1. Modify your active (default) template to include a new module position
2. Publish a module to this new position through the Joomla admin panel

Hope this helps point you in the right direction!
// Below is the standard method for creating modules within J1.5
<jdoc:include type="modules" name="your_new_module_position_name" style="xhtml" />
// Below is the standard method for creating modules within J1.x
<?php mosLoadModules ( 'your_new_module_position_name', -1); ?>

Open in new window

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.