Semion Bourakevich
asked 7 years ago
1 Answers
Kido D
answered 7 years ago

Hi Semion,
– To show the sharing buttons on single question page, you need to edit the sidebar-single.php file in plugins/dw-question-answer/inc/templates folder. So open up the file and find this code (somewhere at the bottom of the file):

<?php do_action( 'dwqa_question_meta' ) ?>

Then add the following code right above it:

<li class="share">Share
<span class="pull-right">
<div class="share-btn">
<a href="" class="twitter-share-button" data-text="@" data-url="<?php the_permalink(); ?>" data-text="<?php the_title(); ?>" data-via="designwall_com" data-related="designwall_com" data-hashtags="wordpress" data-count="none">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);;js.src="";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
<div class="share-btn" style="width: 33px !important;">
<div class="g-plusone" data-size="medium" data-annotation="inline"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = '';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
<div class="share-btn">
<iframe src="//<?php the_permalink(); ?>&amp;width&amp;layout=button_count&amp;action=like&amp;show_faces=false&amp;share=false&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:21px !important; width: 51px !important;" allowTransparency="true"></iframe>

You’ll need a little CSS to style for the sharing buttons, so add this code below to the stylesheet file of your theme:

.dwqa-sidebar .share {padding-bottom: 0;height: 21px;}
.dwqa-sidebar .share .pull-right {margin-top: 4px; margin-right: -3px;}
.dwqa-sidebar .share .share-btn {display: inline-block;height: 21px;overflow: hidden;}

– About the navigation questions, if you are comfortable with PHP, you could modify the single-question.php file in plugins/dw-question-answer/inc/templates folder to add Next/Prev buttons in before or after the page.
Hope that helps!

Powered by DW Question & Answer Pro