Basti117
asked 7 years ago

Hi there,
I’m using the theme "Sahifa" and the sidebar of DWQA is always below the content. I tried the integration guide and many other suggestions, but nothing helped.

Any ideas?
Oh, and I’d love to see a "Back to frontpage" button on the single-question side!
Greetings
Bastian

Ejaz Ahmed
replied 7 years ago

Hi Dominic, Thank you very much for your super quick response and great support. its now working perfectly. I will appreciate if you let me know briefly what files you have touched to resolve it.

Dominic Staff
replied 7 years ago

Hi Ejaz !
I have resolved it in the content-end-wrapper.php / content-start-wrapper.php file, You can find in the folder path “\wp-content\themes\your-theme\dwqa-templates”

5 Answers
DominicStaff
answered 7 years ago

Hello Basti !
Please open the content-start-wrapper.php file and find the following code line 

 <div role="main" id="content">

Replace it with this code:

 <div role="main" class="content">

Hope this helps !

Josiah Wallingford
replied 7 years ago

I am having the same issue. Where do I find the content-start-wrapper.php file?

Dominic Staff
replied 7 years ago

Hello Josiah !
Please find here for the document guide on how to create the file:
http://www.designwall.com/guide/dw-question-answer-plugin/#Style_integration

Josiah Wallingford
replied 7 years ago

Thank you for the speedy reply Dominic. I am having issues finding the content wrapper in my page.php file. Here is the code in my head.php file (I know very little about code but can fumble around):

< ?php get_header(); ?>

< ?php tie_breadcrumbs() ?>

< ?php if ( ! have_posts() ) : ?>

< ?php _e( 'Not Found', 'tie' ); ?>

< ?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'tie' ); ?>

< ?php get_search_form(); ?>

< ?php endif; ?>

< ?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>

< ?php
if( function_exists(‘bp_current_component’) && bp_current_component() ) $current_id = get_queried_object_id();
else $current_id = $post->ID;
$get_meta = get_post_custom( $current_id );

if( !empty( $get_meta[‘tie_review_position’][0] ) ){
$review_position = $get_meta[‘tie_review_position’][0] ;
$rv = $tie_reviews_attr;
}

$post_width = $get_meta[“tie_sidebar_pos”][0];
if( $post_width == ‘full’ ){
if(tie_get_option( ‘columns_num’ ) == ‘2c’) $content_width = 955;
else $content_width = 1160;
}
?>
< ?php //Above Post Banner
if( empty( $get_meta[“tie_hide_above”][0] ) ){
if( !empty( $get_meta[“tie_banner_above”][0] ) ) echo ‘

‘ .htmlspecialchars_decode($get_meta[“tie_banner_above”][0]) .’

‘;
else tie_banner(‘banner_above’ , ‘

‘ , ‘

‘ );
}
?>

>
< ?php get_template_part( 'includes/post-head' ); // Get Post Head template ?>

< ?php the_title(); ?>

< ?php if( !empty( $review_position ) && ( $review_position == 'top' || $review_position == 'both' ) ) tie_get_review('review-top'); ?>

< ?php the_content(); ?>
< ?php wp_link_pages( array( 'before' => ‘

‘ ) ); ?>

< ?php if( !empty( $review_position ) && ( $review_position == 'bottom' || $review_position == 'both' ) ) tie_get_review('review-bottom'); ?>

< ?php edit_post_link( __( 'Edit', 'tie' ), '‘, ‘‘ ); ?>



< ?php if ( get_the_author_meta( 'google' ) ){ ?>

Dominic Staff
replied 7 years ago

Please send me your site for further checking.

Dominic Staff
replied 7 years ago

We have checked your site, I think you does not yet install the DW Q&A plugin in your site. I can not find anywhere.

Dominic Staff
replied 7 years ago

Currently, You are using the template default should not display sidebar,
in the Page Attributes pane on the right hand side, select the template.

Josiah Wallingford
replied 7 years ago

I was very confused there for a second. I actually did not have the option to not display a sidebar selected. The reason it was not displaying was because I had the three files in place in my themes folder. Anyway I deleted them and now you can see the sidebar.

Guru
replied 7 years ago

BTW do you want the sidebar to be on the side(left/rigth) or to be completely turned off (not show at at in the plugin pages)?

Josiah Wallingford
replied 7 years ago

Right side. Usually with this theme you create your sidebar in the theme settings. That sidebar then shows up in your widgets page. You can then select that sidebar from any page along with the position of that sidebar. You can also enable a double sidebar. One on the left and one on the right, or two on the left, or two on the right.
For this all I need is one on the right but it would be nice to have the option to change in the future.

Guru
answered 7 years ago

Dear @josiah
 
Please place the code below in your content-start-wrapper.php file
 

> <?php get_header(); ?>  
> <div class="content-wrap">  
> <div class="content">  
> <?php tie_breadcrumbs() ?>  
>  <div id="blocks-wrapper" class="clearfix">  
> <div id="blocks-left" class="eleven columns clearfix">  
> <?php if( is_page() || is_archive() ) { ?>  
> <header class="entry-header">  
> <h2 class="blogpost-wrapper-title"><?php _e( 'Question & Answer', 'dw-focus' ); ?></h2>  
> </header>  
> <?php } ?>  
>   
> <article <?php if( !empty( $rv['review'] ) ) echo $rv['review']; post_class('post-listing post'); ?>>  
> <?php get_template_part( 'includes/post-head' ); // Get Post Head template ?>  
> <div class="post-inner">  
> <h1 class="name post-title entry-title" itemprop="itemReviewed" itemscope itemtype="http://schema.org/Thing"><span itemprop="name"><?php the_title(); ?></span></h1>  
> <p class="post-meta"></p>  
> <div class="clear"></div>  
> <div class="entry">

and the following in your  content-end-wrapper.php file
 

> </div><!-- .entry /-->  
>     
>  </div><!-- .post-inner -->  
> </article><!-- .post-listing -->  
>   
> <?php //Below Post Banner  
> if( empty( $get_meta["tie_hide_below"][0] ) ){  
> if( !empty( $get_meta["tie_banner_below"][0] ) ) echo '<div class="ads-post">' .htmlspecialchars_decode($get_meta["tie_banner_below"][0]) .'</div>';  
> else tie_banner('banner_below' , '<div class="ads-post">' , '</div>' );  
> }  
> ?>  
>  <?php comments_template( '', true ); ?>  
> </div><!-- .content -->  
>  <?php get_sidebar(); ?>  
> <?php get_footer(); ?>

And advise if its working for you|
 

Josiah Wallingford
replied 7 years ago

I get a syntax error with that code:
Parse error: syntax error, unexpected T_STRING in /home/brink/public_html/wp-content/themes/jardia/dwqa-templates/content-start-wrapper.php on line 12

Guru
replied 7 years ago

Kindly replace the code on line 12

>

with the following

Josiah Wallingford
replied 7 years ago

That helped but did not totally resolve the issue. QA shows up but with this above it:

@Qe`b

Warning: Division by zero in /home/brink/public_html/wp-content/themes/jardia/dwqa-templates/content-start-wrapper.php on line 13

Josiah Wallingford
replied 7 years ago
Guru
replied 7 years ago

You can remove the following from your
/wp-content/themes/jardia/dwqa-templates/content-end-wrapper.php

< ?php //Below Post Banner
if( empty( $get_meta[“tie_hide_below”][0] ) ){
if( !empty( $get_meta[“tie_banner_below”][0] ) ) echo ‘

’ .htmlspecialchars_decode($get_meta[“tie_banner_below”][0]) .’

’;
else tie_banner(‘banner_below’ , ‘

’ , ‘

’ );
}
?>
< ?php comments_template( ”, true ); ?>

Also you can move the following from content-end-wrapper.php into content-start-wrapper.php

< ?php get_sidebar(); ?>

Josiah Wallingford
replied 7 years ago

Changes have been made. Still doesn’t look quite right. Take a look.

Guru
replied 7 years ago

just saw one more thing. You can replace the following in content-start-wrapper.php

< ?php _e( ‘Question & Answer’, ‘dw-focus’ ); ?>

with

< ?php the_title(); ?>

to get the title according to your theme.

Josiah Wallingford
replied 7 years ago

Okay that change is done. Here is what I have now:
content-start-wrapper.php

< ?php get_header(); ?>

< ?php tie_breadcrumbs() ?>

< ?php if( is_page() || is_archive() ) { ?>

< ?php the_title(); ?>

< ?php } ?>

< ?php get_template_part( ‘includes/post-head’ ); // Get Post Head template ?>

< ?php the_title(); ?>

< ?php get_sidebar(); ?>

content-end-wrapper.php

< !– .entry /–>

< !– .post-inner –>

< !– .post-listing –>

< !– .content –>
< ?php get_footer(); ?>

Guru
replied 7 years ago

remove the following from content-start-wrapper.php
< ?php get_template_part( ‘includes/post-head’ ); // Get Post Head template ?>

Guru
replied 7 years ago

And I think i was wrong to ask you to move < ?php get_sidebar(); ?> into the content-start-wrapper.php, it should be in the content-end-wrapper.php

Josiah Wallingford
replied 7 years ago

Changes have been made. I think we are back to where we started.

DominicStaff
answered 7 years ago

Hi Josiah !
Please add  the following code to the content-start-wrapper.php file:

<?php get_header(); ?>
<div class="content-wrap">
<div class="content">
<?php tie_breadcrumbs() ?>
<div id="blocks-wrapper" class="clearfix">
<div id="blocks-left" class="eleven columns clearfix">
<?php if( is_page() || is_archive() ) { ?>
<header class="entry-header">
<h1 class="name post-title entry-title" itemprop="itemReviewed" itemscope itemtype="http://schema.org/Thing"><span itemprop="name"><?php the_title(); ?></span></h1>
</header>
<?php } ?>
<article>
<?php get_template_part( 'includes/post-head' ); // Get Post Head template ?>
<div class="post-inner">
<h1 class="name post-title entry-title" itemprop="itemReviewed" itemscope itemtype="http://schema.org/Thing"><span itemprop="name"><?php the_title(); ?></span></h1>
<p class="post-meta"></p>
<div class="clear"></div>
<div class="entry">

Add  the following code to thecontent-end-wrapper.php file:

</div>
</div>
</article>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

Hope this helps !

DominicStaff
answered 7 years ago

Hi Josiah !Please send me your FTP (via private answer) We will help you resolve this issue.

Josiah Wallingford
replied 7 years ago

Sent

DominicStaff
answered 7 years ago

Hi Joshial !
Please check your site now. We have fixed it 🙂

Josiah Wallingford
replied 7 years ago

Looks great Dominic! Thank you. What did you do?

Josiah Wallingford
replied 7 years ago

Oh no. Well there is an issue. I am trying to change which sidebar shows on my questions page, but the changes are having no effect. I do not know which sidebar it is currently showing but it is not the one I have selected for that page.

Dominic Staff
replied 7 years ago

Hi Josiah !
I have added () tag in the content-end-wrapper.php file.
Please tell me detail about this issue. you can send me a username & password of your site or a screenshot for further checking.

Josiah Wallingford
replied 7 years ago

Here is a video screen capture of what I am seeing:
https://www.youtube.com/watch?v=2m386o1ZPJg

Guru
replied 7 years ago

Try disabling all the plugins and then only enabling dwqa, to see if it works.

DominicStaff
answered 7 years ago

Hi Ejaz !
Please check your site now, We have helped you resolve this issue.

Chris Gonzalez
answered 6 years ago

Hello there!
I have the same template and the same issues:  http://www.autonocion.com/dwqa-questions/
Could you please post here the guide on what did you do in order to fix this problem with Sahifa? I’m sure I and many other users that bought this theme (top#1 editorial in themeforest) will appreciate 🙂
Looking forward to your replies.
Best regards,
Chris.

DominicStaff
answered 6 years ago

Hi Chris !
To resolve this issue. Please add the following code to the content-start-wrapper.php file:

<div id="main-content" class="container">
    <div class="content">
        <?php if( is_page() || is_archive() ) { ?>
        <header class="entry-header">
            <h1 class="entry-title"><?php _e( 'Question & Answer', 'dw-focus' ); ?></h1>
        </header>
        <?php } ?>

– Please add  the following code to the content-end-wrapper.php file:

    </div>
    <?php get_sidebar( 'right' ); ?>
</div>

If you still face there issue, you can send me username & password of your site (via private answer) for further checking.
Hope this helps !

Chris Gonzalez
replied 6 years ago

Hi Dominic,

I applied the code but nothing happened, I am sharing my login details below.

Thanks for the help! Really appreciate 🙂

DominicStaff
answered 6 years ago

I have checked your site and it working now. I think you have resolved this issue.
Regards,

Chris Gonzalez
replied 6 years ago

Hi Dominic,
Many thanks for fixing the sidebar issue! 🙂
However, the plugin seems quite broken (just cannot post a new question http://www.autonocion.com/dwqa-questions/ ).

Is there a quick and easy way to fix it and have it running?

Thanks again!!

Best regards,
Chris.

Powered by DW Question & Answer Pro