A typo apparently.
There should be a failsafe to stop a user from asking the exact same question multiple times. Due to the slow speed it takes from the time the user presses the ‘post question’ button to it being lodged, I have found many times where a user has pressed the button multiple times resulting in the same question being asked (up to 20 times).
There needs to be a way so that if the user asks exactly the same question they get an error popup.
I opened the console in Chrome and noticed that there are scripts being loaded after the <body> tag. Is this intended? Might this be a bug with Anspress or is this normally how WordPress works?
We don’t want to have a downvote button. If I delete the down vote option from the Reputation section, will that also remove the button from the detailed question pages?
Alternatively, I could keep the downvote functionality but change it into a “Like” button worth zero points. How would we go about doing that?
Hello, on my site Anspress is not working properly – front end asking questions does not work: when you press Submit, it reloads the page and nothing happens. An error appears in the console: “Uncaught TypeError: a(…).formSerialize is not a function” (the same when aswering)
Also when I press “upload” (and mouse cursor does not change when hoverin upload or add from link) to upload image, I get to choose a file and then nothing happens. Error in the console: “Uncaught TypeError: a(…).ajaxSubmit is not a function”.
This is version 2.2.0.2. When I update to 2.3.8, the plugin starts acting even weirder, “upload” link no longer opens a dialogue to choose a file, some symbols are replaced with strange ones (wrong encoding?). ap_get_questions stops working on my website’s front page, breaking the PHP code and it also breaks some of my design. So somehow I preferred to hold onto the older version.
Anspress is using my page.php template.
What should I do?
UPDATE: Manually loaded jquery-form, now it works. Why does Anspress not load it by itself?
Hello, I have disabled and deleted the Anspress and Anspress tags beta plugins, and I uploaded versions 2.3.8 and 1.4. The questions and answers have been deleted, ok. But tags and number counter questions remain. How could I reset this data?
This should be added to core plugin, it’s a good practice to have unique body classes for custom pages. Drop this in your functions.php file of your active theme and these classes will show up in <body class=”…”>
// Add specific CSS class to body tag based on Anspress page type add_filter( 'body_class', 'body_question' ); function body_question( $classes ) { if(is_question()){ $classes[] = 'ap-question-body'; } elseif(is_ask()){ $classes[] = 'ap-ask-body'; }elseif(is_question_categories()){ $classes[] = 'ap-categories-body'; }elseif(is_question_category()){ $classes[] = 'ap-category-body'; }elseif(is_question_tag()){ $classes[] = 'ap-tag-body'; }elseif(is_ap_user()){ $classes[] = 'ap-user-body'; } return $classes; }
AnsPress Functions
There may be more, these are the ones I found and needed to use.
- is_question = true if single question page
- is_ask = true if page where you ask your question
- is_question_categories = true if page lists all categories
- is_question_category = true if single category page
- is_question_tag() = true if single tag page
- is_ap_user() = true if single user page (profile)
Setting unique classes for each page type allows you to have some custom CSS specific to those pages, like hiding elements.
Here’s an issue I noticed. If I leave an answer in the frontend logged in as user, it shows up in profile stats. But, if I’m logged in as admin and enter answer in WP admin (selecting user from author dropdown) that answer is not counted for the user selected but it does count that answer for the admin that left the answer. I hope that makes sense.
Can you see if you can replicate this bug? Here’s how.
Simply add an answer to another question in the backend WP admin and from the author dropdown select me. Publish answer and then check my profile to see if the answer shows up there, then check your own stats and you’ll see you have 1 extra answer but no actual answer associated.
Here’s an example, where only 1 answer shows up but I’ve marked 2 answers as best… for 2 separate questions.
But if you look at admin profile, you’ll see it has one answer and it shouldn’t:
I want to modify the plugin’s CSS with my own styling through my extension, but I was wondering what will happen when I, in the future, install the AskBug theme. Will the theme’s styles take precedence over my custom styling and re-style the plugin’s styles, particularly on the question list?
I am using askbug theme. Hover card is out of alignment. Please help.