Hello, Right menu is not available since AskBug 3.x. All user related links and notification shows automatically in header right. If Notification menu not showing then go to AnsPress options and enable notification addon.
<?php /** * To view theme functions, navigate to /buddyboss-inc/theme.php * *@package Boss *@since Boss 1.0.0 */ $init_file = get_template_directory() . '/buddyboss-inc/init.php'; if ( !file_exists( $init_file ) ) { $err_msg = __( 'BuddyBoss cannot find the starter file, should be located at: *wp root*/wp-content/themes/buddyboss/buddyboss-inc/init.php', 'boss' ); wp_die( $err_msg ); } require_once( $init_file );
Following@Rahul suggestion, i’ve created an example of mycred hook: add_action(‘ap_publish_comment’, function($comment) {<br /> $points=5;<br /> mycred_add(‘ap_comment’,$comment->user_id,$points,”Points for comment sent”);<br /> }, 10, 1); it can be done for all other hooks.
After dozen of hours spent to debugging i’ve found the solution. In few words my theme adds comment_post action doing such instructions: if(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'){ switch($comment_status){ case "0": wp_notify_moderator($comment_ID); case "1": //Approved comment esc_html_e("success","blackfyre"); i had to debug thousands rows of code to find this, but finally i found it. Now i’m using remove_action core function to remove that hook under anspress pages. PS. is there a better method to find such issues in you opinion? thank you
Hello Fred, Its because you are calling it outside the loop. If you want to use it outside loop simply pass question id to ap_question_metas( get_question_id() ), that’s it. Cheers.
Any update fixing this ?
ok now work, and sorry i have problem with notification icon on menu: when i click on icon, give link: site.com/#apNotifications and not work
Please check now. Which plugin you are using for multi lang? AnsPress is compatible with PolyLang plugin. It doesn’t work with WPML.
Hi, please help me ASAP, tthanks.
Holla Howard, wo_count_posts() is not a proper function to count AnsPress posts, instead use ap_total_posts_count or use short one ap_total_published_questions or use ap_total_solved_questions() ap_answer_get_the_count works only inside loop. Use ap_total_posts_count for counting answers as well. Check the link for more detail of arguments.