Anyone else have had this error, more so, does anyone know how to resolve it?
when i am trying to add new question on my website its gives me an error. the error is – trying to cheat?
Hi, I have a problem with comments – non-loggedin users can’t comment. Here “Who can post comment?” I set – anyone, includin non-loggedin but I get error – Someting wrong. Where is the problem? Thx for help
I have decided to incorporate AnsPress into my BuddyBoss theme and platform website, and I’m excited about the upcoming launch. However, I have concerns regarding the lack of recent updates for AnsPress and the potential compatibility issues that may arise when BuddyBoss releases updates. I fear that this could lead to a disruption in the functionality of AnsPress and result in a loss of my valuable community.
To mitigate this risk, I am interested in exploring options to ensure continuous support and compatibility for AnsPress. Is there a possibility to purchase AnsPress services or obtain a premium version that guarantees ongoing updates and compatibility with my website? By securing a reliable solution, I can maintain the seamless integration of AnsPress within my platform and provide an enhanced experience for my community members.
Hello.
I was able to solve the process of separating the category selection into main and sub on the question page as follows, but this arrangement caused an error message on the AnsPress settings screen and I overcame it. You cannot select pages with this error, but it does not disrupt previous selections. These are the things I noticed.
What kind of problems does this regulation cause in the general framework? I wonder about this. If it’s just a minor warning, using this gets me there.
It would be great if someone could review it in detail and report any issues that may arise with AnsPress.
<?php /** * AnsPress Select tipi alan nesnesi. * * @package AnsPress * @subpackage Fields * @since 4.1.0 * @author Rahul Aryan<[email protected]> * @copyright Copyright (c) 2017, Rahul Aryan * @license http://opensource.org/licenses/gpl-3.0.php GNU Genel Kamu Lisansı */ namespace AnsPress\Form\Field; // Doğrudan erişildiğinde çıkış yap. if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Select tipi alan nesnesi. * * @since 4.1.0 */ class Select extends \AnsPress\Form\Field { /** * Alan tipi. * * @var string */ public $type = 'select'; /** * Alanı hazırla. * * @return void */ protected function prepare() { $this->args = wp_parse_args( $this->args, array( 'label' => __( 'AnsPress Seçim Alanı', 'anspress-question-answer' ), 'options' => array(), 'terms_args' => array( 'taxonomy' => 'question_category', 'hide_empty' => false, 'orderby' => 'id', 'parent' => 0, // Yalnızca üst düzey terimleri al (ana kategoriler) ), ) ); // Ebeveyn hazırlığını çağır. parent::prepare(); // 'options' değerine göre sanitize işlevini belirle. if ( in_array( $this->get( 'options' ), array( 'posts', 'terms' ), true ) ) { $this->sanitize_cb = array_merge( array( 'absint' ), $this->sanitize_cb ); } else { $this->sanitize_cb = array_merge( array( 'text_field' ), $this->sanitize_cb ); } } /** * Bir seçim alanının seçeneklerini döndür. * * @return array */ private function get_options() { $options = $this->get( 'options' ); if ( is_string( $options ) && 'terms' === $options ) { $terms_args = $this->get( 'terms_args', array() ); // Yalnızca üst düzey terimleri al (ana kategoriler) $terms_args['parent'] = 0; $main_categories = get_terms( $terms_args ); $category_options = array(); foreach ( $main_categories as $main_category ) { $child_terms = get_terms( array( 'taxonomy' => 'question_category', 'parent' => $main_category->term_id, 'hide_empty' => false, ) ); foreach ( $child_terms as $child_term ) { if ( ! isset( $category_options[ $main_category->name ] ) ) { $category_options[ $main_category->name ] = array(); } $category_options[ $main_category->name ][ $child_term->term_id ] = $child_term->name; } } return $category_options; } if ( is_string( $options ) && 'posts' === $options ) { return wp_list_pluck( get_posts( $this->get( 'posts_args', array() ) ), 'post_title', 'ID' ); } return array(); // Beklenmeyen durumlar için boş dizi döndür } /** * Alan HTML işaretleme. * * @return void */ public function field_markup() { parent::field_markup(); $this->add_html( '<select' . $this->common_attr() . $this->custom_attr() . '>' ); $this->add_html( '<option value="">' . __( 'Bir seçenek seçin', 'anspress-question-answer' ) . '</option>' ); $options = $this->get_options(); // $options bir dizi veya nesne mi diye kontrol edin if ( is_array($options) || is_object($options) ) { foreach ($options as $main_category => $child_terms) { if (!is_array($child_terms) && !is_object($child_terms)) { continue; // Dizi veya nesne değilse döngüyü atla } $this->add_html('<optgroup label="' . esc_attr($main_category) . '">'); foreach ($child_terms as $term_id => $term_name) { $selected = selected($this->value(), $term_id, false); $this->add_html('<option value="' . esc_attr($term_id) . '" ' . $selected . '>' . esc_html($term_name) . '</option>'); } $this->add_html('</optgroup>'); } } else { // Beklenmeyen durumda ise hata ayıklama mesajı ekleyin error_log('Options is not array or object: ' . var_export($options, true)); $this->add_html('<optgroup label="' . __('Mevcut seçenek yok', 'anspress-question-answer') . '"></optgroup>'); } $this->add_html('</select>'); /** Bu eylem lib/form/class-input.php içinde belgelenmiştir */ do_action_ref_array('ap_after_field_markup', array(&$this)); } }
I have tried EVERYTHING to get the category pages to simply show the questions within the category. I am using elementor’s hello theme. I have the same issue with 2022 and 2024 Themes. I also tried Astra Theme at which it would not load the category pages at all.
I have tried the permalink steps repeatedly. I was even open to creating an archive page for the categories with Elementor – that’s not an option.
I simply need to know how can I get the questions to show under the categories.
Hi,
I have a problem with the Ask a Question page in combination with WPML.
The page in the default language works correctly.
But if I go to the translation, it only shows the forum file. It shows the same erroneous page both with login and without login.
https://www.fundacioictus.com/comunitat/forum/nou-tema/
https://www.fundacioictus.com/es/comunidad/foro/nuevo-tema/
Can you help me?