• I try to make the plugin to display correctly with IconicOne theme.

    I’m a bit lost what to add in the theme’s Page.php since it is very different from the example posted in the website FAQ.

    The “page.php” is

    <?php
    /**
     * The template for displaying all pages.
     *
     * This is the template that displays all pages by default.
     * Please note that this is the WordPress construct of pages
     * and that other 'pages' on your WordPress site will use a
     * different template.
     *
     * @package WordPress - Themonic Framework
     * @subpackage Iconic_One
     * @since Iconic One 1.0
     */
    
    get_header(); ?>
    
    	<div id="primary" class="site-content">
    		<div id="content" role="main">
    
    			<?php while ( have_posts() ) : the_post(); ?>
    				<?php get_template_part( 'content', 'page' ); ?>
    				<?php comments_template( '', true ); ?>
    			<?php endwhile; // end of the loop. ?>
    
    		</div><!-- #content -->
    	</div><!-- #primary -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Any help is much appreciated.

    https://wordpress.org/plugins/dw-question-answer/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,
    As far as I can see plugin inserts it’s own template inside page that you set up to display Q/A. You can’t change template through your theme, instead look for wp-content/plugins/dw-question-answer/inc/templates/default folder and inside you have two PHP files you have to manually adjust: content-start-wrapper.php and content-end-wrapper.php

    In content-start-wrapper.php look for:

    default:
    echo '<div id="container">
    <div id="content" role="main">';
    break;

    and replace it with your own structure, example:

    default:
    echo '<div id="primary" class="site-content"><div id="content" role="main">';
    break;

    Then open content-end-wrapper.php and close all sections, instead:

    default:
    echo '</div></div>';
    get_sidebar();
    break;

    this will close example structure:

    default:
    echo '</div><!-- #content -->
    </div><!-- #primary -->';
    break;

    Once you properly insert your theme structure the plugin will display correctly. If sidebar is not displayed correctly try to insert it also like this:

    default:
    echo '
    </div><!-- #content -->
    </div><!-- #primary -->';
    get_sidebar();
    break;

    Is this working for you?
    All the best

    Thread Starter massimod

    (@massimod)

    @gojak

    Many thanks, i will have to try all that. They are totally different from the instructions the plugin dev gives.

    Thread Starter massimod

    (@massimod)

    Actually the only problem i have with this plugin (without touching anything) is that it doesn’t seem to respect the page format. It takes the whole page width and the sidebars are pushed down.

    Not sure i must do all those changes.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘DW Q&A and Iconic One theme’ is closed to new replies.