Dom Amor
asked 7 years ago

Hi again. Is there a way to place WP widgets in the DW Question Answer sidebar. 
Also on your site you have a nice green button for ask question. On my mine I  just have text “ask question” Anyway to change this. 

5 Answers
Hung DinhStaff
answered 7 years ago

1. Let me check this out with our tech team on the next monday
2. The look and feel of your Q&A plugin depends alot on the template you are using. You can achive that easily with a few CSS tweaks

Dom Amor
answered 7 years ago

Yes, I would think so. I was thinking that part might of been from the css of Q and A… Thanks again. 

BigHug
answered 7 years ago

Hi Dom, 
1. You can replace default sidebar in single question page by a custom sidebar. Please go to your theme folder, make a folder then named it as “dwqa-templates“, in this folder make a file “sidebar-single.php“.


DWQA Sidebar Template

You can use yourcode in this file or user default sidebar of twenty twevle (default theme of wordpress ):

 <?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
<div id="secondary" class="widget-area" role="complementary">
<?php dynamic_sidebar( 'sidebar-1' ); ?>
</div><!-- #secondary -->
<?php endif; ?>

In another way, if you want to add sidebar in the both of questions list page and single page, you can use “dwqa_after_page” action hook, like this :

 function dwqa_simplex_sidebar(){
get_sidebar();
}
add_action( 'dwqa_after_page', 'dwqa_simplex_sidebar' );

But in this way, you need more CSS custom to make your theme and your question page look good.

2. About ask question button style, it depends on your theme style, if you want to use our button. Here is our custom css for it:

 .dw-question .questions-wrap .btn {
display: inline-block;
    padding: 6px 20px;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: bold;
    line-height: 20px;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    color: #333;
    text-shadow: none;
    background-image: -webkit-gradient(linear,left 0,left 100%,from(#fff),to(#e6e6e6));
background-image: -webkit-linear-gradient(top,#fff,0%,#e6e6e6,100%);
    background-image: -moz-linear-gradient(top,#fff 0,#e6e6e6 100%);
    background-image: linear-gradient(to bottom,#fff 0,#e6e6e6 100%);
    background-color: #f5f5f5;
    background-image: -moz-linear-gradient(top,#fff,#e6e6e6);
    background-image: -webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));
    background-image: -webkit-linear-gradient(top,#fff,#e6e6e6);
    background-image: -o-linear-gradient(top,#fff,#e6e6e6);
    background-image: linear-gradient(to bottom,#fff,#e6e6e6);
     background-repeat: repeat-x;
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);
    border-color: #e6e6e6 #e6e6e6 #bfbfbf;
    border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);
    filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
    border: 1px solid #ccc;
    border-bottom-color: #b3b3b3;
    border-radius: 3px;
}

 

 .dw-question .questions-wrap .btn .btn-success {
    color: #fff;
    text-shadow: 'none';
    background-image: -webkit-gradient(linear,left 0,left 100%,from(#8dc03c),to(#7fad36));
    background-image: -webkit-linear-gradient(top,#8dc03c,0%,#7fad36,100%);
    background-image: -moz-linear-gradient(top,#8dc03c 0,#7fad36 100%);
    background-image: linear-gradient(to bottom,#8dc03c 0,#7fad36 100%);
    background-color: #87b83a;
    background-image: -moz-linear-gradient(top,#8dc03c,#7fad36);
    background-image: -webkit-gradient(linear,0 0,0 100%,from(#8dc03c),to(#7fad36));
    background-image: -webkit-linear-gradient(top,#8dc03c,#7fad36);
    background-image: -o-linear-gradient(top,#8dc03c,#7fad36);
    background-image: linear-gradient(to bottom,#8dc03c,#7fad36);
    background-repeat: repeat-x;
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff8dc03c',endColorstr='#ff7fad36',GradientType=0);
    border-color: #7fad36 #7fad36 #547224;
    border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);
    filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}

 

 .btn-success:hover, .btn-success:focus {
    color: #fff;
    background-color: #7fad36;
    background-position: 0 -15px;
    -moz-transition: background-position .1s linear;
    -o-transition: background-position .1s linear;
    -webkit-transition: background-position .1s linear;
    transition: background-position .1s linear;
}

Feel free to apply it to your site 🙂
Hope this helps!
 

Dom Amor
replied 7 years ago

Thank you so much. I’ll give it a try later on. Ill let you know how I make out.

Thank you so much.

rahmat raharjo
answered 7 years ago

Yups.. it depends on template. It had been my case, till I changed the template, and now the button turns to a nice green one.. Thanks to Mr. Mimin (admin) for creating such a beautiful plugin..

Dom Amor
answered 7 years ago

What I did that worked out great for me. 
I created
1. You can replace default sidebar in single question page by a custom sidebar. Please go to your theme folder, make a folder then named it as “dwqa-templates“, in this folder make a file “sidebar-single.php“.
Then copied the contents from my theme sidebar.php to qwqa-templates/sidebar-single.php so now I have the same side bar with q&a as the rest of the side. 
And just added your css in this post to my existing css of my theme and all is well. Thank you.. 

Dom Amor
answered 7 years ago

However, what would be nice is a widget to show recent questions and answers so we could place that throughout our site. But I’ll put that on my Christmas list.. 

Jin
replied 7 years ago

Thanks for the suggestion Dom. We will consider it 🙂

Ankush Mehrotra
replied 7 years ago

Looking for it.

Jin
answered 7 years ago

Hey guys, 
The version 1.1.1 of the plugin is now available for download.
In this version we have included captcha and brought back the sidebar.
Check out at our blog post: http://cmspioneer.com/designwall/blog/dw-question-answer-wordpress-plugin-version-1-1-1-spam-free-and-the-return-of-sidebar/
Cheers

Sweet Pea
answered 4 years ago

Hay help please … I want show DW question category .. this doesn’t work for me please

Dominic Staff
replied 4 years ago

Please create a private question and send me username & password of your site, I will check and help you resolve it now.

Powered by DW Question & Answer Pro