The MU forums have moved to WordPress.org

display same logo image on any template (17 posts)

  1. sandg
    Member
    Posted 15 years ago #

    I've setup WPMU and the themes are working great. Am working on user customizations:

    1. How can I allow my users to use their own logo for their own site?
    2. The logo needs to be displayed no matter what template they choose. How do I do this?

    thanks

    -noob-

  2. Ovidiu
    Member
    Posted 15 years ago #

    where do you want the logo to be displayed?
    in the sidebar? easy,
    in the header? then you would want to only use themes with a customizable header...

  3. sandg
    Member
    Posted 15 years ago #

    Logos should be in the header. I think it should work by making the logo a transparent GIF or PNG file that resides in a layer above the actual header image. But I don't know how/where to add this 'layer' code into the template.

    How do I know if the theme is customizable? Aren't all themes customizable?

    thx

  4. andrea_r
    Moderator
    Posted 15 years ago #

    There's a built-in function to make the header into one where the user can upload their own header and replace the one there. That's what is meant by "customizeable" as your users can't access the files, only you can.

    So, if you want to make a theme and make it so the header is replaceable by each user, go here:
    http://boren.nu/archives/2007/01/07/custom-image-header-api/

  5. cafespain
    Member
    Posted 15 years ago #

    Thanks for that Andrea. That'll save me a wee bit of time later today.

  6. andrea_r
    Moderator
    Posted 15 years ago #

    No problem. I'm currently experimenting with it a bit to replace other non-headerish areas. :)

  7. sandg
    Member
    Posted 15 years ago #

    It doesn't look like it's gonna what I need. I don't want my users to replace the header with one of their own. The only thing they can add to the header is their own logo, which will maintain displayed if they change to another template, without having to reupload the logo image.

    How can this be done? :S

  8. andrea_r
    Moderator
    Posted 15 years ago #

    okay, try this. Plunk the image URL for their log into a text widget. they then place it in their sidebar. it will stay there regardless of theme (assuming all themes are wdigetized).

  9. sandg
    Member
    Posted 15 years ago #

    I'm sorry, can you explain it in plain English pls? I'm so new to this I've no idea what you mean. Tq

  10. MrBrian
    Member
    Posted 15 years ago #

    Shes saying to have the logo displayed as a widget (in the sidebar). I think that's your best bet too.

  11. tdjcbe
    Member
    Posted 15 years ago #

    Actually something like the following may work better for you instead of a widget. Put what code you want in there as well as the link and drop the file into the mu-plugins subdirectory. In this example, it'll display your banner within a link at the upper right of every page.

    <?php
    function banner_insert() {
    $code = '
    <div style="position:absolute;right:0;top:0;width:163px;"><a href="http://mysite.tld/" target="_blank"><img border="0" src="http://mysite.tld/mybanner.png" alt="My website!"></a></div>
    ';
    echo $code;
    }
    add_action("wp_footer", "banner_insert");
    ?>
  12. andrea_r
    Moderator
    Posted 15 years ago #

    "The only thing they can add to the header is their own logo, which will maintain displayed if they change to another template, without having to reupload the logo image."

    tdjcbe - this is what he's looking for, not one logo on all blogs (although that was handy)

  13. sandg
    Member
    Posted 15 years ago #

    @MrBrian: thanks for 'translating' that. =)

    @tdjcbe: It's not what I'm looking for but your suggestion will come in handy as I'm planning to insert banner ads on all sites later on. Tq.

    @andrea_r: I don't think having the logo as a widget at the sidebar would be appropriate as I don't intend to have any sidebars at all, as the sites will have it's page links horizontally with the header. So having a sidebar just to display the logo would look odd, unless there's something else I can throw in like an announcement section (do such plugins exist?)

    Is there really no way to achieve this? One logo on all templates? sigh..

    thanks, u guys!

  14. andrea_r
    Moderator
    Posted 15 years ago #

    "So having a sidebar just to display the logo would look odd, unless there's something else I can throw in like an announcement section (do such plugins exist?)"

    Oooooo.. actually, I just wrote a wee small plugin that does something like this. It can be used for ads, announcements... anything really.

    All you'd need to do is put the function call in each template where you wanted the logo to show up.

    what's your email?

  15. sandg
    Member
    Posted 15 years ago #

    grandsand [at] gmail [dot] com

    don't laugh =P

  16. andrea_r
    Moderator
    Posted 15 years ago #

    wait till you see my gmail address... :D

  17. sandg
    Member
    Posted 15 years ago #

    thanks, andrea! works for displaying same info on all sites/blogs.

    Am still holding out for a solution..

About this Topic