Mike
asked 3 years ago

I have purchased DW pro. I want to use Elementor Pro to build a knowledge base page. Here is my situation.I found the pages may have some conflicts with my existing theme.
I have built new pages for questions and ask a question. Also, I change the template of these two new pages which solved the problem. 
 
However, the “question” page is dynamically generated. I don’t know how to change the template of the page. I have no way to use a short code to build a new page for “question” either. Is there any workaround to change the default template of “question”? Thank you!

2 Answers
DominicStaff
answered 3 years ago

At the moment, the plugin does not yet compatible with the Elementor theme. In this case, you can replace the index.php with the following code:

<?php
/**
 * The site's entry point.
 *
 * Loads the relevant template part,
 * the loop is executed (when needed) by the relevant template part.
 *
 * @package HelloElementor
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly.
}

get_header();

$is_elementor_theme_exist = function_exists( 'elementor_theme_do_location' );

if ( is_singular() ) {
    if ( ! $is_elementor_theme_exist || ! elementor_theme_do_location( 'single' ) ) {
        get_template_part( 'template-parts/single' );
    }
} elseif ( is_archive() || is_home() || is_tax ( $taxonomy = 'dwqa-question_category' ) ) {
    if ( ! $is_elementor_theme_exist || ! elementor_theme_do_location( 'archive' ) ) {
        get_template_part( 'template-parts/archive' );
    }
} elseif ( is_search() ) {
    if ( ! $is_elementor_theme_exist || ! elementor_theme_do_location( 'archive' ) ) {
        get_template_part( 'template-parts/search' );
    }
} else {
    if ( ! $is_elementor_theme_exist || ! elementor_theme_do_location( 'single' ) ) {
        get_template_part( 'template-parts/404' );
    }
}

get_footer();

If you still face their issue, you can send me the username & password of your site for further checking. I will help you resolve the issue.  

DominicStaff
answered 3 years ago

About the “question” page, you can let me know detail about this issue, you can send me your site URL and a screenshot for further checking.

Powered by DW Question & Answer Pro