The two upcoming features for DW Question and Answer plugin Embed Question and Social sharing. Social sharing is very common and we all know about it already. What about Embed question? How does it look like? Will it work like other types of embedded posts?
I. Embed Questions like the “embedded posts” of Facebook
Embedded posts are very common nowadays in blogging and web content, especially with WordPress since it has made things super easy to embed a video, an image, audio, tweet and others. Embedded posts look much more engaging and livelier than a shared link or content. Here is how an embedded tweet looks like
Okay. Points/Credits feature & MyCred.me integration is on the way. What is the next feature you are looking for? http://t.co/7zMEY1nAeb
In August 2013, Facebook also introduced the Embedded post feature to help FB users share their public posts on blog/website
So imagine you are on Question & Answer site and you want to share an interesting question via blog or simply promote your question to attract more answers on other websites?
is it possible?
We say Yes! Let us introduce you a complete new function of DW Question & Answer plugin: Embed Question.
Working like any other type of embedded content in WordPress, Embed Question function allows you to embed a question from DW Question and Answer site into your WordPress content or any website. Using markup of the plugin, you can easily display a question into your site, either a blog post, page content or even text widget. One thing that you should take note is that it only works for Public question. You cannot embed a private question (of course since no-one would see the question anyway).
How to embed?
There are 3 ways you can do it:
1. Paste the link
This is the fastest way to share your question. Simply paste your question link into any where of the content on your site. The plugin will automatically convert that question link into an embedded content inside a WordPress post content.
However, it only works within your site using the Question and Answer plugin, you cannot copy and paste the link to other website.
2. Use iFrame
This is the way you would use in order to share and embed your question into any other website.
<iframe width="#" height="#" src="#question-link"></iframe>
You must be familiar with iFrame and how to use it already. Work like a charm! Using iFrame brings convenience that you can place a question anywhere on website and control the size and how it appears.
3. Use shortcode
Shortcode is used when you want to embed a question into text widget. We have registered a shortcode handler: dwqa_question for the DW Question Answer plugin to convert a shortcode macro into special markup.
Simply use this format for text widget in order to embed your question:
[ dwqa_question ]http://yoursite.com/question/<question-title>/[/ dwqa_question ]
Note: Please make sure that your WordPress theme already supports this. In case the shortcode is not shown in any content of your text widget, please add this line of code: add_filter(‘widget_text’, ‘do_shortcode’); into your theme file functions.php
Besides, you can generate Question Embedded Post markup from your theme or other custom code by passing the macro string through the WordPress Core do_shortcode function.
<?php echo do_shortcode('[ dwqa_question ]http://yoursite.com/question/<question-title>/[ /dwqa_question ]'); ?>
The above code will generate the same markup as a shortcode macro inside your post.
II. Share your Questions to attract more Answers
Besides the embed question function, Share your question via social sharing buttons is also a new function which we will support for the DW Question and Answer plugin.
Visit this link to see how it looks like after sharing to facebook
Located right under a question, we have options for Facebook, Twitter, G+, LinkedIn and Tumblr. Now you can share your favourite question to those social channels within a click.
Both functions are still on the development phrase. We would like to test it on our own Q&A Platform before officially release into the next updated version of the plugin.
What do you think about these functions? What would you like to improve before we do the final commit to the updated version?