Like
Like Love Haha Wow Sad Angry

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

In August 2013, Facebook also introduced the Embedded post feature to help FB users share their public posts on blog/website

https://www.facebook.com/FacebookDevelopers/posts/10151471074398553
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.

http://cmspioneer.com/designwall/question/anything-wordpress-and-the-free-lifetime-membership-at-designwall/

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.

  http://yoursite.com/question/<question-title>/

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>

dwqa-embed-blog-1

Demo

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.

dwqa-embed-blog-2
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?

Like
Like Love Haha Wow Sad Angry

Jin

Jin is Nanny at DesignWall, a leading WordPress development company which builds responsive WordPress themes and best WordPress plugins. She makes sure everyone is happy, every question is answered, every release is bug-free. She also blogs about our products and shares her WordPress knowledge with our readers. Jin is also a travel lover.

19 comments

So…the comment on your Q&A site does not work or show up at all? This is really weird since no-body has raised this issue before. Can you share a screenshot about it? Or just raise a question and I will ask our developer to take a look for you 🙂

Jin after upgrading the plugin to latest, it worked, but the question embedding is not doing well,
here look at this
you can see that embedded question is showing at not proper style, also you can see the comment function on each question or answer is not working while everything have a green light on permission page.

I have notified our developer about your case Anik, when they have the answer I will get back to you as soon as possible.

I have tried to use this on my blog running on Genesis Eleven40 child theme. The share buttons are not showing up at all. Also if you look at the post, the related posts, share plugin used on blog and content I added using a “Post Layout Plugin” are all showing up.

How can I solve this?