The MU forums have moved to WordPress.org

Hardcode "My Blogs" to "My Pages" (12 posts)

  1. erickjes
    Member
    Posted 14 years ago #

    I would like to change the link at top left that says "My Blogs" to "My Pages"

    What file do I need to edit to make this change? I have been searching for hours...tried almost every file I can think of in wp-admin and wp-admin/includes, and some JS files. Completely stumped.

  2. erickjes
    Member
    Posted 14 years ago #

    Andrea..you out there?

  3. DeannaS
    Member
    Posted 14 years ago #

    There's a filter for it:
    apply_filters( 'my_blogs_title', __( 'My Blogs' ) );

    Read about using filters here:

    http://codex.wordpress.org/Plugin_API#Filters

  4. andrea_r
    Moderator
    Posted 14 years ago #

    I gotta sleep sometime. :) Deanna has the answer.

  5. erickjes
    Member
    Posted 14 years ago #

    LOL Andrea...you SLEEP?!!! hehehe just kidding :)
    Thanks for the reply Deanna, I will read more about it, maybe stop pulling my hair out!

  6. erickjes
    Member
    Posted 14 years ago #

    Okies, so never made a plugin before, but I gave it a go and this is what I wrote:

    ----------------------------------------------------------------------
    <?php
    /*
    Plugin Name: Blog to Website
    Description: Changes any occurrence of the word blog to website.
    Version: 1.0
    Author: Jessica E.
    */
    ?>

    <?php

    function blog_to_website($content) {
    global $blog;
    $content=str_ireplace($blog,'{website}',$content);
    return $content;

    }?>

    <?php

    apply_filters('blog_to_website',__('blog'));

    ?>

    ----------------------------------------------------------------------

    Of course it doesn't work since this is too advanced for me! The directions in the link you gave me said:

    1. Create the PHP function that filters the data.
    2. Hook to the filter in WordPress, by calling add_filter()
    3. Put your PHP function in a plugin file, and activate it.

    I's my function all messed up?

  7. erickjes
    Member
    Posted 14 years ago #

    eh...I figured it out.

  8. Klark123
    Member
    Posted 14 years ago #

    erickjes: could you post your solution? thanks.

  9. erickjes
    Member
    Posted 14 years ago #

    Seems my solution reverted back to well, not working =/ I am totally lost with this. I just know that you need to create a plugin with a function and filter. I just don't know the exact coding...I will keep trying until I figure it out.

  10. Klark123
    Member
    Posted 14 years ago #

    fyi, this would work.

    http://premium.wpmudev.org/project/site-wide-text-change

    premium plugin

  11. erickjes
    Member
    Posted 14 years ago #

    I tried that, but it only changed the texts, not the links =/

  12. erickjes
    Member
    Posted 14 years ago #

    Reinstalled Site-Wide plugin and it worked this time. Phew!

About this Topic

  • Started 14 years ago by erickjes
  • Latest reply from erickjes