Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Plugin “Tip of the Day” : Ajax functions no more working when BP is disabled


grosbouff
Participant

@grosbouff

Ok, got it.
I have to use another ajaxurl than the one defined in BuddyPress :

`function totd_wp_head() {
//ajax url is defined in BP but not in WP
if (!defined( ‘BP_VERSION’ )) {
?>

<!–
var ajaxurl = “/wp-admin/admin-ajax.php”;
//–>
<?php
}
}

add_action(‘wp_print_styles’,’totd_wp_styles’);`

Skip to toolbar