looking for a plugin ...

I'm looking for a plugin that will add a description under my main website title at the top in the header.

i thought it would have been this bit (img below), but it's not unless it's just not showing for me.

 

 

thank you. 

 

 

  • I don't know if a plugin exists. But you could create a plugin on your own. It's not too difficult. All you would need is a start.php (only necessary fot the plugin to be a plugin...) with the single line:

    <?php

    and a manifest.xml (just take a manifest.xml for an existing plugin and edit the name and id tags at least to match your plugin name / plugin folder name).

    And then you would have to override the Elgg core header_logo.php file. Just create a copy of /vendor/elgg/elgg/views/default/page/elements/header_logo.php in your plugin as /mod/YOUR_PLUGIN_NAME/views/default/page/elements/header_logo.php and change the content for example to

    <?php
    /**
     * Elgg header logo
     */

    $site = elgg_get_site_entity();
    $site_name = $site->name;
    $site_url = elgg_get_site_url();
    $sitedescription = elgg_get_config('sitedescription');
    ?>

    <h1>
        <a class="elgg-heading-site" href="<?php echo $site_url; ?>">
            <?php echo $site_name; ?>
        </a>
    </h1>

    <?php

    if ($sitedescription) {
        echo "<div>" . $sitedescription . "</div>";
    }

    Then you would get at least the site description displayed below the site name. Of course, it might look rather dull this way. But you could change the style of the div according to your liking.

  • thank you for all this but i'm not a coder sorry, i know a little html and css stuff, but know nothing about php, i'm far too busy to learn as i'm ill aswel so have too much on ... but thank you for all that.

     

  • With the code I posted you already have a plugin if you save it as I have outlined. Or you could just add the modified /vendor/elgg/elgg/views/default/page/elements/header_logo.php file to your theme plugin. The only remaining thing would be styling according to your liking / to fit with your theme. But that's just some easy html/css coding.

  • ok so i did it, but i got an error and my site broke ....... error on line 1 start.php

     

    i just added the line <?php like u said above ..... what have i done wrong please ?

     

     

     

  • iv' done it anyways, just added some text in the header-logo.php which i didn't know where it was before i made this thread.

    so i like to learn when i'v time ... i won't use this plugin, but i'll make it if you can help me fix it, and i'll add it to the plugin list here if that's ok.

     

    thank you :) 

     

     

    i'v made the plugin files and saved it so it's ready.