Skip to:
Content
Pages
Categories
Search
Top
Bottom

Missing argument for bp_modify_page_title() – Elegant themes and Buddypress


  • Laynerd
    Participant

    @laynerogers

    I came across several threads dealing with this particular error, and they were all related to Elegant Themes (I was having it using Divi with Buddypress), and the only solution they came up with was replacing

    <title><?php elegant_titles(); ?></title>

    with

    <title><?php wp_title(); ?></title>

    in the header.php file.

    That doesn’t entirely fix the problem, because your page titles still won’t display correctly. The problem is that Elegant Themes uses elegant_titles in place of wp_titles as a function for custom title displays for their theme(s). So the best solution (at least as far as I could figure out – not really a coder) was to go into the buddypress/bp-core/bp-core-filters.php file in the Buddypress plugin and edit this line:

    add_filter( 'wp_title', 'bp_modify_page_title', 10, 3 );

    to say

    add_filter( 'elegant_titles', 'bp_modify_page_title', 10, 3 );

    This fixes the call from the plugin so that it’s actually working with your theme, rather than having BP and WP communicate over your theme’s head. I’ve noticed quite a few people are having this particular issue, and while this fix worked for my theme (Divi), you may need to check your header.php to make sure that elegant_titles is the right function for your particular theme.

Viewing 1 replies (of 1 total)

  • Henry Wright
    Moderator

    @henrywright

    Hi @laynerogers

    Rather than changing BP core files, you should contact the theme author asking that they look into making their page titles compatible with BP. The changes you’ve made to bp-core-filters.php will be lost each time you update BuddyPress.

Viewing 1 replies (of 1 total)
  • The topic ‘Missing argument for bp_modify_page_title() – Elegant themes and Buddypress’ is closed to new replies.
Skip to toolbar