Support » Networking WordPress » wp_title filter problem

  • Hello,

    I need to change wp title with plugin, but I have problem with using wp_title filter in WPMU installation.

    I have this simple code:

    function my_title_filter($oldtitle) {
        return "added by plugin | $oldtitle";
    }
    add_filter('wp_title', 'my_title_filter', 500);

    This code works perfect in normal WP installation, but not in WPMU.
    Is there some differences between WPMU and standard WP installation? Maybe I should use some other filter in WPMU for the same thing?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Where’d you put the code? Is this in a plugin that’s active on the site?

    Thread Starter Ivan M

    (@ivanm89)

    Yeah, code is in plugin, and plugin is active on the site. The same code works fine in normal (single) wordpress installation.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    I just tested this on a clean Multisite. Put the code in a plugin file, activated it on the site, and all the post titles get ‘added by plugin’ put in front, no problems.

    Try turning on WP_DEBUG

    Thread Starter Ivan M

    (@ivanm89)

    Thanks for info. I probably have conflict with some other plugin, or even maybe plugin for caching. I’ll try turn on wp_debug, and find the problem.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘wp_title filter problem’ is closed to new replies.