I don’t know if is a issue, but just in case: If I deleted a question, is deleted from “My questions” page, but I can still see the question in the “Activiy” page.
Thanks.
Hi,
As of now, email notifications to users are showing “WordPress” on the ‘From’ field.
And the email address is ‘[email protected]’
I need to edit both these fields.
Please tell me how.
Thanks!
Hello,
Recently launched my sites here and here. I have Anspress set up on both. I just got an email from a user saying that they were unable to post a question.
Any ideas?
I designed the preloaded page that displays all of the asked questions, however, when a user goes to different AnsPress pages, the design for the all questions page carries over. Is there anyway I can’t prevent that from happening?
Im wondering how to tag location to the anspress questions. Ideally, I need a map on ASK page where users can select their location. This location tag will be later used as a filtering option.
Let me know hoe this can be achieved.
Ashvam
What are the steps to install buddypress?
Hi Rahul,
the following code would use post id as new question slug when user creates a new question.
It works well. However, it doesn’t work when the user edit an question.
when user edit an question, somehow the answer title would become the post slug, overwriting the slug id that was there before.
all i wanted is the use post id when user create a new question, or even edit an existing question. is there any action hook other than ap_after_new_question ?
thanks.
add_action( ‘ap_after_new_question’, ‘using_id_as_slug’, 10, 2 );
function using_id_as_slug($post_id, $post){
global $post_type;
remove_action(‘ap_after_new_question’, ‘using_id_as_slug’ );
wp_update_post(array(‘ID’ => $post_id, ‘post_name’ => ‘q’ . $post_id ));
add_action(‘ap_after_new_question’, ‘using_id_as_slug’ );
}
Edit —
the following solution works for me. of cause, you can refactor to remove redundant code.
add_action( 'ap_after_new_question', 'using_id_as_slug', 10, 2 ); add_action('ap_after_update_question', 'using_id_as_slugB', 10, 2); function using_id_as_slug($post_id, $post){ global $post_type; if (wp_is_post_revision($post_id)) return false; remove_action('ap_after_new_question', 'using_id_as_slug' ); wp_update_post(array('ID' => $post_id, 'post_name' => 'q' . $post_id )); add_action('ap_after_new_question', 'using_id_as_slug' ); } function using_id_as_slugB($post_id, $post){ global $post_type; if (wp_is_post_revision($post_id)) return false; remove_action('ap_after_update_question', 'using_id_as_slugB' ); wp_update_post(array('ID' => $post_id, 'post_name' => 'q' . $post_id )); add_action('ap_after_update_question', 'using_id_as_slugB' ); }
as you can see feom the screen shot, editor shows html code when user try to modify answer?
is that an expected behavior? it looks strange to me, as user might not have html knowledge, they might be confused what those p tags are.
Hi!
I’m including thumbnails from the questions in the users page, like this:
But in some pages I can’t take the ID from the question to put the image, like in Reputation page. I tried some functions, but I can only get the answer ID.
For example, in theme/default/user/reputation-content.php
<?php /** * Reputation loop item template * */ ?> <?php //Do not change id attribute ?> <div id="ap-reputation-<?php ap_reputation_get_the_id(); ?>" class="ap-reputation-item <?php ap_reputation_get_the_class(); ?>"> <?php $questionID = FUNCTION_TO_GET_THE_QUESTION_ID; echo '<div class="float: left; containerIMG" style="border: solid 1px white;outline: solid 1px;margin-right: 10px;width: 54px;float: left;height: 54px;">'. imgBackground( 52, $questionID ).' </div>'; ?> <span class="point"><?php ap_reputation_get_the_reputation() ?></span> <div class="no-overflow"> <span class="time"><?php ap_reputation_get_the_date(); ?></span> <span class="info"><?php ap_reputation_get_the_info(); ?></span> </div> </div>
What I should use in $questionID ?
Thanks.
No sharing plugin till now is showing the question title on facebook
Is there a work around for this issue??