Hello, is it possible to view all Questions with the Answers on one page with pagination?
I tried to setup my own template overrides for Anspress, but the following code shows all the quesions but as well every answer under the questions. But I want to view only the answer for the coresponding question.
Thanks in advance!
content-list.php
<?php /** * Question list item template * *<a class="ap-mention-link" href="https://anspress.io/user/link">@link</a> https://anspress.io *<a class="ap-mention-link" href="https://anspress.io/user/since">@since</a> 0.1 *<a class="ap-mention-link" href="https://anspress.io/user/license">@license</a> GPL 2+ *<a class="ap-mention-link" href="https://anspress.io/user/package">@package</a> AnsPress */ if ( ! ap_user_can_view_post(get_the_ID() ) ) { return; } global $post; $clearfix_class = array( 'ap-questions-item clearfix' ); $have_permission = ap_user_can_read_answer( $post ); ?> <!-- Frage --> <div id="question-<?php ap_question_the_ID(); ?>" <?php post_class($clearfix_class ); ?>> <div class="ap-questions-inner"> <div class="ap-questions-summery no-overflow"> <p class="post-meta"> <?php the_author(); ?>, <?php ap_question_the_time(); ?> </p> <h2 class="entry-title"><?php the_title(); ?></h2> <?php the_content(); ?> </div> </div> </div> <!-- /Frage --> <!-- Antwort --> <?php ap_question_the_answers(); ?> <!-- /Antwort -->
anwers.php
<?php /** * Answers content * * Control the output of answers * *<a class="ap-mention-link" href="https://anspress.io/user/link">@link</a> https://anspress.io/anspress *<a class="ap-mention-link" href="https://anspress.io/user/since">@since</a> 2.0.1 * *<a class="ap-mention-link" href="https://anspress.io/user/package">@package</a> AnsPress */ ?> <?php if(ap_have_answers()): ?> <div id="ap-answers-c"> <?php if(ap_user_can_see_answers()): ?> <div id="answers"> <?php $i = 1; while ( ap_have_answers() ) : ap_the_answer(); include(ap_get_theme_location('answer.php')); $i++; endwhile ; ?> </div> <?php else: ?> <div class="ap-login-to-see-ans"> <?php printf(__('Please %s or %s to view answers and comments', 'anspress-question-answer'), '<a class="ap-open-modal ap-btn" title="Click here to login if you already have an account on this site." href="#ap_login_modal">Login</a>', '<a class="ap-open-modal ap-btn" title="Click here to signup if you do not have an account on this site." href="#ap_signup_modal">Sign Up</a>'); ?> </div> <?php do_action('ap_after_answer_form'); ?> <?php endif; ?> </div> <?php endif; ?>
answer.php
<?php /** * Answer content * *<a class="ap-mention-link" href="https://anspress.io/user/author">@author</a> Rahul Aryan <[email protected]> *<a class="ap-mention-link" href="https://anspress.io/user/link">@link</a> https://anspress.io/anspress *<a class="ap-mention-link" href="https://anspress.io/user/since">@since</a> 0.1 * *<a class="ap-mention-link" href="https://anspress.io/user/package">@package</a> AnsPress */ global $post; $have_permission = ap_user_can_read_answer( $post ); ?> <div id="answer_<?php the_ID(); ?>" <?php post_class() ?> data-id="<?php the_ID(); ?>"> <div class="ap-q-inner"> <div class="ap-answer-content ap-q-content" itemprop="text"> <p class="post-meta"> <?php the_author(); ?>, <?php ap_answer_the_time(); ?> </p> <h2 class="entry-title">Meine Antwort:</h2> <?php the_content(); ?> </div> </div> </div>
Hi I keep getting this message “website resources limit exceeded” when i try to view user profiles or the page for a user profile just keeps loading without viewing the profile and once it starts loading it doesnt allow me to go back or go to other pages.
What might be the issue because my cpanel also shows that the website has used 100% of the CPU.
here is my website: http://askmzansi.co.za/
HI i hope you are as well.
Thank You Very Much For Your Great Plugin . IM Very Appreciate you Guys For That
1- Is This Possible for you to make the tapatalk plugin for anspress ?
BBpress has plugin for that. i hope you can make it too.
because the default integrated anspress theme is useless its very simple and anspress is pretty and beautifull just in the dedicated thems (answerbox and ansbug) and i think its time to release the first tapatalk plugin for that.
2-WHEN WE CAN SEE THE ANSWERBOX THEME ?
WHEN YOU WANT TO RELEASE IT?
GUYS I HAD SEARCHED A LOT AND I SEE YOU JUST SAID FOR NEXT TIME AND NEXT TIME AND NEXT TIME NOT COMING ! 😀 AND YOU HANT RELEASED IT.
PLEASE DO IT IF POSSIBLE.
THANK YOU VERY MUCH.
Hello,
My site uses https. When I am asking question from user “subscriber”, after clicking “Send question” I redirected to http and have many problems with displaying icons FontAwesome in the tab of AnsPress and at the site in general. How can I solve this?
Hello, I tried many plugins for forum to WordPress, but yours is the best one.
I have got some questions:
1 – Is there any possibility to add short part of answer (15-20 symbols) in widget under question?
2 – Is it possible to make random question to be shown?
3 – How to delet – X Answer | X Votes – on widget?
Thanks for your work!
Hello. I have problem with “Private questions”.
While i try change via “Status” – http://prntscr.com/dm4sje all is fine.
But when i try update question or while i create question, box doesnt save http://prntscr.com/dm4tb9 or change to non-checked.
P.S. I also trying clear twentysixteen theme with only anspress plugin. Result the same.
My question is. I’m currently using woocommerce and Divi Builder (from eleganthemes), is the AskBug theme compatible with Woocommerce?
Compatible with Divi Builder?
I may be interested in purchasing your AskBug theme just for use with the Q&A portion of my site.
thanks
Hello,
I just installed the plugin and gave me these errors on header of all pages, how can I fix it? Do I need to change the code?
Warning: in_array() expects parameter 2 to be array, boolean given in /srv/users/blabla/apps/domain/public/wp-content/plugins/anspress-question-answer/includes/hooks.php on line 556
Warning: in_array() expects parameter 2 to be array, boolean given in /srv/users/blabla/apps/domain/public/wp-content/plugins/anspress-question-answer/includes/hooks.php on line 564
I am using WooCommerce along AnsPress.
I noticed that when users post reviews (which are WP comments) for products (which are WP custom post type) and when I approve them, these users get subscribed to AnsPress table wp_ap_subscribers and they get notifications about new reviews by the AnsPress Email plugin.
This is not an expected behavior. Subscriptions should only work for comments made within AnsPress.
I found that this is done by this function:
/**
* Subscribe user for post comments
*@param object $comment Comment object.
*/
public static function after_new_comment($comment) {
$post = get_post( $comment->comment_post_ID );$type = ‘q_post’;
$question_id = $post->ID;if ( ‘answer’ == $post->post_type ) {
$type = ‘a_all’;
$question_id = $post->post_parent;
}if ( ! ap_is_user_subscribed( $comment->comment_post_ID, $type, $comment->user_id ) ) {
ap_new_subscriber( $comment->user_id, $comment->comment_post_ID, $type, $question_id );
}
}
Hi everyone,
I’ve been made aware of an issue with the notification emails about responses to questions on our forum.
The notification email sent to a user contained the email address and IP of the user who responded. This is definitely not the kind of information we want our users to be able to view.
Are you aware of any filters/hooks/options I can use to edit the anspress email templates?
Many thanks
Alex