adding a new html tag in the header

Hi! I wanted to add a tag line under the site name...

so I added a div tag and the the value inside it as you see bellow it to the header_logo.php and uploaded it to the element folder of my theme. but still I don't see any changes in the html make up.

    <a class="elgg-heading-site" href="<?php echo $site_url; ?>">
        <?php echo $site_name; ?>
    <div class="slogan">
        <?php echo "Hello World"; ?>


I even tried adding a line in the header.php basically next to the line that prints header_logo.php:

echo elgg_view('page/elements/header_logo', $vars);
echo "say something!";

and still logo. Am I in the right place for changing the html?

  • Turn on developer tools and see if you are changing the right file for that view.

  • Specifically, use the view inspector to check which file is generating the header_logo.

  • Hi Evan! Thanks for the feed back.

    I made a few discoveries along the way.... HTMLs are in default/pages/elements folder inside the elements and header.php needs to go there.

    as for the developers toos I seriously need some documentation as how I can take advantage of it. I have looked the menues in provides in the admin but its not enough. can you ellaborate how I can check to see which file it is changing? Is it by going through menus (e.g. buttons, components, forms...) in theme_preview?

    The css location shown by the inspector (e.g. is not really helpful in finding directories.

    anyways... I'm making process and will document it here:

  • If you want to add custom html to header, 

    • Copy the elgg/views/default./page/elements/header_logo.php file to elgg/mod/your_plugin/views/default./page/elements/header_logo.php and ake changes to this file
    • Make sure this is the last plugin to be loaded in the plugin list, so that no other plugin overrides this view
    • Run the upgrade.php or flush the caches and run upgrade from admin dashboard

    Elgg's Css are dynamic ones tailored together when the system loads. You cant find these css files in the corresponding library. Take a look at any of the core plugin and see how css are extended in Elgg.

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking