Using divi builder to edit single question page

6.54K viewsCore
0

Hey,

I’m hoping that someone can help here, as i may be missing something simple.

I use divi builder (a page builder) on my wordpress site to help customise the layout of my pages.

So far I have successfully customised the archives, ask, user, categories and tags pages by using the divi builder then dropping in the anspress shortcode.

However I cannot seem to figure out a way to use divi builder on single question pages (ie the one you’ll be reading this question on).

I have tried to change the question slug for a single question page, then create a page with the same name and edit that, but it still wont display any divi builder layout.

What am I doing wrong?

Help would be greatly appreciated.

Cheers.

Question is closed for new answers.

Hello Tom,
Not sure about the issue, I will give it a try.

I appreciate it.

Looking forward to hearing your findings.

0

Hello Tom,

I was very busy lately, so I was not able to write the tutorial. Let me describe it in short here.

As single question page is rendered using a shortcode under the hood so it was hard to edit it using shortcode. To overcome this issue you have to override single question page template. Follow below steps:

  • Firstly you must remove action hook:

    anspress()->add_action( ‘loop_start’, ‘AP_QA_Query_Hooks’, ‘loop_start’ );

  • Now if you go to single question page it will look like a normal post.
  • Create a file in your template single-question.php and copy all contents from single.php.
  • Now inside the loop call this : ap_get_template_part(‘single-question’);

After this you’ll be able to edit the single question page as well.

Cheers.

0

Thanks for getting back to me. Please link me to your FAQ, as I cannot find it.

I am a little unclear in understanding your reply. I know that anspress is rendered using a shortcode – this is how I have implemented your plugin – I create a page in wordpress, style it with Divi builder then drop in the shortcode. It’s only the single question page that I have not managed to do this on.

Is there a way of selecting a separate page to use for the single question page?

commented on answer

pls answer this. my issue is unresolved.

1

Yes,

AnsPress is rendered using a shortcode so divi style is not working on single page. There is a way not to render AnsPress using shortocde. I am writing a tutorial about it. You may check that tomorrow in our documentation’s FAQ section.

commented on answer

can you please link to the FAQ you posted. I can’t find it.

0

hi, did you manage to find an answer for this, Rahul?