Skip to:
Content
Pages
Categories
Search
Top
Bottom

PHP-Error


  • Michael Berra
    Participant

    @miguael

    I am running BP with a custom theme and I don’t wan’t the link to the Home-Blog showing up. So I just deleted it from the header. Now it gives me in the error-log this one:

    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘bp_show_home_blog’ was given in /services/webs/berra.graphic-studio.ch/htdocs/wp-includes/plugin.php on line 414

    Is there a possible solution to avoid that error, but still not put the Menu-Link to the home-blog in the header?

    THANKS!

Viewing 7 replies - 1 through 7 (of 7 total)

  • Paul Wong-Gibbs
    Keymaster

    @djpaul

    You’ve obviously deleted the wrong bit. Put it back, and try again.


    Michael Berra
    Participant

    @miguael

    Thanx, that’s what I found out, too :-). It is just the call for that menu in the header (like in standard bp-member-theme). The question is, how to avoid that without showing the blog-menu-item. Thanks for your efforts…


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Just delete

    <li<?php if ( bp_is_page( BP_HOME_BLOG_SLUG ) ) {?> class="selected"<?php } ?>><a href="<?php echo get_option('home') ?>/<?php echo BP_HOME_BLOG_SLUG ?>" title="<?php _e( 'Blog', 'buddypress' ) ?>"><?php _e( 'Blog', 'buddypress' ) ?></a></li>


    Michael Berra
    Participant

    @miguael

    Yes – that’s exactly what I did and that gives me the error in Log FIle I mentioned above…


    Michael Berra
    Participant

    @miguael

    Hmmmm – i found out, that not this deleted line in the header gives me that php-error (as I thought). Any idea, what could cause this? Did I miss something in my custom theme that changed with the updates of the trunk?

    Another strange thing happens: If I have the Blog-Menu in my theme – the bp_home_slug doest point to the right page (the home-blog) but to an article in another blog… strange…

    Thanks again for your help…


    Jeff Sayre
    Participant

    @jeffsayre

    There were some changes to the header.php file. Off the top of my head, I cannot remember if both the buddypress-home and buddypress-member themes had changes. Or, if only one of them had changes.

    Either way, the best thing to do is open your header.php file and compare it to the new header.php file of the respective BuddyPress theme.

    If I have the Blog-Menu in my theme – the bp_home_slug doest point to the right page (the home-blog) but to an article in another blog…

    It should be BP_HOME_BLOG_SLUG, not BP_HOME_SLUG.


    Michael Berra
    Participant

    @miguael

    I think I found out what caused the problem. I had to comment out one line in the functions.php:

    add_action( ‘wp’, ‘bp_show_home_blog’, 2 );

    Now it seems to work without the link in the theme.

    I am not a programmer – I fI did something stupid, just tell me :-)

    Thanks for all…!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘PHP-Error’ is closed to new replies.
Skip to toolbar