Using divi builder to edit single question page

7.49K 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.

You are viewing 1 out of 4 answers, click here to view all answers.