Hi @Rahul, any suggestion on this topic please?
Hi Rahul, for themes like the one that florinb has, who have an option to include just “posts” in search, i think you need to add the post_type to your “loop_start” hook from qaquery_hooks.php . so instead of if ( $query->is_main_query() && $query->is_single() && ‘question’ === get_query_var( ‘post_type’ ) ) { $query->posts[0]->post_content = ‘[anspress]’; } you should have if ( $query->is_main_query() && $query->is_single() && ‘question’ === get_query_var( ‘post_type’ ) ) { $query->posts[0]->post_content = ‘[anspress]’; $query->posts[0]->post_type = ‘post’; } this way, you’ll make sure your injected post is treated as a “post”.
I have the same issue: Default theme search string overwrites anspress search. I am using “smart mag” theme and the search string looks like one below, which is identical to anspress search string. /?s=anspress this might not be an isolated case, as Michael as highlighted this issue. ________ @Rahul, do you think it’s possible to make anspress search string different from the default one that themes use? I consider buying the askbug theme as well but if I can’t use the search, i can’t move forward. Thanks, Florin
Hello Rahul, Nieuw problem https://www.ietsdoenofferte.nl/product/drinkfles-mepal-campus-pop-up-275-ml-roze: $x0 = $this->xml; $v3396_0 = $x0->xpath(“name[1]”); echo $this->getValue($v3396_0);
Thanks a lot ! The update solved the issue.
Thanks for your reply. That simply means Anspress is not for me or anyone using Sensei LMS. Time to try other Q & A plugins.
This is due to same custom post type name “question”. Both plugins are using same cpt. This cannot be fixed from our site as we cannot change post type.
Please get in touch by email. Thanks
Please try 4.1.11