The MU forums have moved to WordPress.org

How to get Site Admin out of Meta section in sidebar (21 posts)

  1. scobb99
    Member
    Posted 16 years ago #

    I don't like my blog displaying a link to Site Admin. This link appears in the Meta section in the sidebar and I cannot find a way to remove it other than turn off the display of Meta section. What am I missing?

    I am using wp-andreas01-12 theme and not sure if this isa theme or Wordpress matter.

    Thanks for any insight...Stephen
    http://www.cobbsblog.com/blog

  2. emoruffino
    Member
    Posted 16 years ago #

    edit sidebar.php

    should be in there towards bottom ;)

  3. t3ch33
    Member
    Posted 16 years ago #

    adding to what emoruffino said: only remove the meta section in sidebar.php if you don't want it displayed on *all* of the blogs created on your site (including your users' blogs-which they may want to display). If you just want it disabled on *your* blog, then just customize your widgets in presentation>widgets.

  4. scobb99
    Member
    Posted 16 years ago #

    Thanks for the amazingly fast response. The Meta widget only seems to have one customizable option, namely the title (currently >>>>>>).

    Is there any way to customize what is included in the Meta widget?

    Likewise the Links widget seems to provide no way of changing the title, so I the rather redundant

    Links
    Blog Roll

    That said, what you guys told me made a lot of sense and I have just taken out the Meta widget and meta section from the sidebar.php. I am the main contributor and if there is anyone else I can give them the URL to log in. I just don't like making the login process to obvious [too tempting] to malingerers.

    Thanks again for being so helpful.

  5. jwesseldyke
    Member
    Posted 16 years ago #

    I too am trying to edit the information in the meta widget. I realize that I can use a text widget and just put the information I want in that, however, that doesn't impact all the blogs using a specific template, just the blog I'm working on...

    I'm not a total newbie, but not a skilled coder either, but I went to the sidebar.php, found the meta links within the file, and changed them to what I wanted, assuming that it would impact all the blogs using that theme...

    Changing the file made zero difference in what displayed on the public blog. I thought maybe the widget over rides the sidebar file, so I took the meta widget off the sidebar hoping then the sidebar I had changed would display... No luck.

    There must be a way to edit the specific meta widget, as all of them have different information and links depending on the theme being used...

    So my question is... Where did I go wrong and how does one edit the actual widget in a theme to display something different than what's automatically displayed?

    Any help is greatly appreciated... :)
    JW

  6. zappoman
    Member
    Posted 16 years ago #

    Yes, the widget will override the sidebar... you'll want to look at the widgets.

    You could also implement your own widget as a plugin that overrides the Meta name, and replaces it's functionality.

  7. jwesseldyke
    Member
    Posted 16 years ago #

    Thanks for your input, zappo...

    The problem is, even when I took the meta widget off the side bar, my edited sidebar didn't show up then either... The same admin and links appeared with or without the widget.

    Writing widgets is beyond my understanding and even in that case wouldn't guarantee the meta information I want to display on all the blogs...

    I'm trying to make all the meta information uniform across the whole community no matter which theme is being used, so I'm guessing the key is to either edit the meta widgets, which I don't know how to do, or edit the sidebar.php files for each theme -- which didn't seem to work.

  8. zappoman
    Member
    Posted 16 years ago #

    What theme are you seeing this with? I know some themes (like Regulus) will show meta info in the "sidebar" area... but that's only because it wraps the sidebar used by widgets with some fixed html/components...

    I guess the point is that this stuff is theme and widget specific.

  9. jwesseldyke
    Member
    Posted 16 years ago #

    The theme I'm playing with at the moment with this is SilverLight... I haven't edited other themes that are available on my site because I figured I'd work with one that nobody else was using as it's new and I can test it on my own blog...

    It's just odd to me that taking the widget out and editing the sidebar.php file to what I want displayed didn't have any effect on what displays on the public side at all...

    Anyway, if you have other ideas they're much appreciated...
    J

  10. andrea_r
    Moderator
    Posted 16 years ago #

    was the code you put in the sidebar *outside* the widget if statement? Did you remove all the widgets or just that one?

  11. jwesseldyke
    Member
    Posted 16 years ago #

    Hi, Andrea...

    I don't know how to change the meta widget itself, so I removed that from the side bar from my dashboard...

    When I do that, the theme, SilverLight, displays it's own version of meta information with links, etc... So I went to that section of the sidebar.php file and just changed the links that were in that section... I didn't move anything around, I left the structure the same, just changed the links within that section...

    Strangely, there was no change in what displayed on the public side of the blog... Which I don't understand at all...

    I'm clearly missing something... I'm fairly competent with the most basic changes and editing the files, but this one just has me scratching my head...

  12. GreginUK
    Member
    Posted 16 years ago #

    I made changes to the META widget on my site by editing the wp_widget_meta function in widgets.php in the wp-includes directory.

    Not the ideal solution I know but it works

  13. andrea_r
    Moderator
    Posted 16 years ago #

    If you still have widgets dragged on to the sidebar, you won't see any changes that you made to sidebar.php.

    Unless, like I said above, you make the edits *outside* of the widget if statement.

  14. jwesseldyke
    Member
    Posted 16 years ago #

    OK, there have been so many versions of what I've tried they're all running together... So let me sum up everything as best I can in one post... :)

    What I want to do:

    To edit the meta information that displays on each blog. Either by editing the widget (which I don't know how to do) or by taking the widget off the sidebar in the admin section and hard coding the meta information within the theme.

    Why:
    So all the themes have the same meta information including links and login, etc. instead of every theme having it's own list of links...

    What I've tried (in one theme so far, gotta get one to work before I move on):

    Changing the sidebar.php... I edited the file and replaced the links in the file with the links I want to display. I didn't move anything around within the code or change any of the php stuff... I simply changed the links...

    Then I uploaded the sidebar.php file, dragged the meta widget off the sidebar, updated/saved, then refreshed the blog I was testing on... Where I'm baffled is: the links stayed the same as they were before my edit. I don't understand it, but they did...

    In case it matters, the theme I'm working with is SilverLight. Seems to me like changing the php file and removing the widget from the sidebar would automatically change what displays... But it doesn't.

    To make myself sound less ignorant, I do know how to change the php template files as I have modified many of them over the last year while playing with standard wp as well as mu...

    This one just has me confused...

    So, I'm back to wondering why this may happen, beyond the obvious like, "Didn't save sidebar.php before uploading..." and "Didn't ftp to the right directory..."

  15. jwesseldyke
    Member
    Posted 16 years ago #

    OK... So here's an update... I still can't get the SilverLight theme to work, but I did manage to get other themes to work...

    Must be something somewhere that I missed...

    Thanks for all the help, everyone...
    J

  16. andrea_r
    Moderator
    Posted 16 years ago #

    "Then I uploaded the sidebar.php file, dragged the meta widget off the sidebar, updated/saved, then refreshed the blog I was testing on... Where I'm baffled is: the links stayed the same as they were before my edit. I don't understand it, but they did..."

    Got any caching running?

  17. jwesseldyke
    Member
    Posted 16 years ago #

    Good question. I don't know the answer though... How would I find out?

    This may be a dumb question...

    Is it possible that the sidebar.php file is all or nothing in terms of widgets and using the information within the file?

    In other words, does it have to be all or none with widgets or do the various sections display by default if there isn't a widget for that section...

    Does this make sense?

    For example, I'm working with a theme, my-times... within the sidebar.php there is multiple sections...

    list pages, archives, meta, etc...

    Again, when I changed the meta information, dragged the meta widget off the sidebar... Nothing displays... But I do have other widgets on the sidebar...

    Does MU say, "Oh, well, there is a widget here, so everything must be widgetized and therefore no need to display the meta code this guy changed..."

    I'm grasping at straws... what can I say...

  18. lunabyte
    Member
    Posted 16 years ago #

    Edit: /wp-includes/widgets.php

    If there is 1 widget in the sidebar, that will be the sidebar UNLESS there is something in the template file outside of the widgetized section.

    Without widgets in a sidebar, then it reverts back to what the theme calls.

    Honestly, I don't see what the big deal is. It's a link for a logged in user to head to their profile/dashboard. Probably a nice thing to have.

  19. andrea_r
    Moderator
    Posted 16 years ago #

    "Does MU say, "Oh, well, there is a widget here, so everything must be widgetized and therefore no need to display the meta code this guy changed...""

    YES. :D

  20. aaronbeau
    Member
    Posted 15 years ago #

    I just installed WordPress, and I stumbled upon this post when trying to eliminate the Site Admin piece out of the Meta Widget. I was successful in eliminating that piece of code.

    This is what I wanted to do:
    Site Admin (Change to Account Profile)
    Login/out (Keep)
    Entries RSS (Keep)
    Comments RSS (Keep)
    WordPress.org (Remove)

    Here is what I did:
    I modified two files.

    1. wp-includes/widgets.php
      This is where I remove WordPress.org
      You can also remove the RSS Feeds too
    2. wp-includes/general-template.php
      Changed line 52 to
      $link = $before . '<a href="' . get_option('siteurl') . '/wp-admin/profile.php">' . __('Account Center') . '</a>' . $after;

    Hope this helps

  21. dsader
    Member
    Posted 15 years ago #

    from http://automattic.com/code/widgets/api/

    Write your improved version of said widget using the conventions of any other widget but add an "unregister_sidebar_widget" to deactivate the original.

    Drop said widget file into mu-plugins. Original meta widget gone. Your meta widget is born. Save your mu-plugins when you upgrade, no need to keep track of a change to a core file.

About this Topic