Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • vipcory Friend
    #177115

    I read many different ways of doing this… does anyone know the right way to do it for j2.5?

    remove the entire tag:
    meta name=”generator” content=”Joomla! – Open Source Content Management”

    thanks

    Saguaros Moderator
    #453386

    Hi vipcory,

    There are two ways you can do it:

    1. The easy way is: go to Extensions >> Template Manager open your default template >> Edit main page template

    it will open index.php file:

    // no direct access
    JFactory::getDocument()->setGenerator('Your own words or leave it empty'); <<< you add this line
    defined ( '_JEXEC' ) or die ( 'Restricted access' );
    <?php $this->setGenerator('Your own words or leave it empty'); ?>

    2. The second way will completely remove the generator meta tag from Joomla:

    Open /libraries/joomla/document/html/renderer/head.php with your favor editor

    Search for meta name=”generator” and you will see:

    if ($generator)
    {
    $buffer .= $tab . '<meta name="generator" content="' . htmlspecialchars($generator) . '" />' . $lnEnd; <<< add // to the beginning of this line
    }

    Save and clean cache.
    Hope this helps!


    1. edittmp
    tim_aus Friend
    #491240

    I have the ja-university theme and have tried the second way and it doesn’t work for me, I added
    // if ($generator)

    Saguaros Moderator
    #491652

    Hi tim_aus,

    Try to add that comment for code line inside the if. It look like:

    // $buffer .= $tab . ‘<meta name=”generator” content=”‘ . htmlspecialchars($generator) . ‘” />’ . $lnEnd;

    Regards

    tim_aus Friend
    #491858

    Hi Saguaros,

    Thanks that worked!

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

This topic contains 5 replies, has 3 voices, and was last updated by  tim_aus 11 years, 6 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum