Duplicate questions while using categories

4.69K viewsIssues
0

I’m experiencing an issue where I’m creating two categories on a page and displaying each one from a shortcode [anspress categories=”questions”] and another with [anspress categories=”tips”]. This works well on the front end in 1/2 container, showing one side with questions and the other with the tips. The problem after this is when I click on a question, say on the ‘question’ category, It will reload the page with two lots of questions, rather then showing the questions and tips that have been asked. Is there something I need to do on the back end to keep the short code categories the same when they load the questions or tips etc?

Will you please upload screenshot showing your issue

0

Hello Darren,

You know, You can override almost every part of AnsPress templates. Also if your site is new, consider moving to AnsPress 4.0 rather then using our old version.

You can search for strings you want to override here:

https://github.com/anspress/anspress

and if file is inside templates folder then it can be overriden from your theme folder else if that string is coming from function or core file then there must be filter hooks at the bottom of function or file by which you can filter strings.

for example you want to change “Question in one sentence“, then it can be found here:

https://github.com/anspress/anspress/blob/master/includes/ask-form.php#L43

At the bottom of the function you’ll see a filter ‘ap_ask_form_fields’. So you have to use this filter to override ask form fields strings.

Cheers.

0

Hi Rahul,

Sorry for the late reply. I have attached an image of what I’m trying to achieve. Hopefully this makes sense to what I want and what issues I’m facing. I would have assumed allowing us to choose a category would only pull in the details for that ‘category’ when a question has been created. As you can see part one works fine as it pulls in the correct category. Part two and three have issues.

I have also added suggestions in red that might be handy for future releases i.e custom button names and search tabs dependent on the ‘category’ chosen.

Is there anyway I can change these in the code to allow the front end to show different search terms and button names etc?

The only other way I would be able to create two separate questions is by creating a page for each one. Thats the only gripe I have at the moment. Apart from this I would say you have the best plugin on WordPress for what I’m trying to achieve.

Regards

Darren

commented on answer

have you resolve yet? if yes, how did you do please?