Elgg, how to

Posted on Dec 26, 2011 in News, Tips & Tricks | 2 comments

If you’ve followed the previous tutorials on how to customize Elgg, using your own plugin, “myplugin”, you can easily add following tips to myplugin/start.php.

To remove the more drop down menu, add this line,

elgg_unregister_plugin_hook_handler('prepare', 'menu:site', 'elgg_site_menu_setup');

To remove the RSS icon, add the following line of code,

elgg_unregister_plugin_hook_handler('output:before', 'layout', 'elgg_views_add_rss_link');

To add latest comments and tag cloud to activity page and the wire page,

if (elgg_get_context() == 'activity' || elgg_get_context() == 'thewire'){
	elgg_extend_view('page/elements/sidebar', 'page/elements/comments_block', '501');	
	elgg_extend_view('page/elements/sidebar', 'page/elements/tagcloud_block', '502');

To add you own copyright information to the footer,

$href = "http://www.perjensen-online.dk";
elgg_register_menu_item('footer', array(
	'name' => 'copyright_this',
	'href' => $href,
	'title' => elgg_echo('myplugin:tooltip'),
	'text' => elgg_echo('myplugin:copyright'),
	'priority' => 500,
	'section' => 'alt',

You can download a copy of myplugin below, everything is included. Please feel free to leave a comment or question.


  1. 9-12-2013

    ¿how to remove the sidebar from all the site? thanks

  2. 9-12-2013

    You can do that by overriding a file or adding CSS.

    Add the CSS file, views/default/myplugin/css.php and in myplugin/start.php let elgg know you added the file,

    elgg_extend_view('css/elgg', 'myplugin/css');

    Then add this,

    .elgg-sidebar { 
    	display: none; 
    .elgg-layout-one-sidebar { 
    	background: none; 

    Or you can copy this file to myplugin,


    And in the last line of code, change one_sidebar to one_column.

Leave a Comment

Your email address will not be published. Required fields are marked *

Anti-Spam Quiz: