Paul Romero
asked 8 years ago

Hi,
If anyone can help me out.
 
I’d like to display the questions on my homepage with a limit of 10 questions only shown (don’t want it too long).
I also was wondering how did designwall make a dropdown for With product as I understand this is product tags
Thanks.

2 Answers
Guru
answered 8 years ago

Dear Paul, 
You can use the blog theme customise option to set the main page as your question listing page. The number of questions listed can be set from the settings of the DWQA admin panel.
For you final option, the tags in a dropdown list is custom work by DW and they haven’t shared their code with us.

Best regards,

Paul Romero
replied 8 years ago

Thanks.

I was wondering about embedding the question listing page (with limited questions) on another page.

BigHug
answered 8 years ago

Here are the code that we are using to display question tags. Please enjoy it.

wp_dropdown_categories( array( 
    'name' => 'question-tag',
    'id' => 'question-tag',
    'taxonomy' => 'dwqa-question_tag',
    'hide_empty' => 0,
    'selected' => 'Other',
    'class' => 'input-block-level',
    'exclude' => $exclude_tags_id,
    'hierarchical' => 1,
    'value' => 'name',
'walker' => new dwqa_question_tag_walker() 
) );

Regards

Paul Romero
replied 8 years ago

wow thanks!
where do i insert this? 🙂

BigHug
replied 8 years ago

We can use this code to show the dropdown tag list anywhere, for our submit question page, i have detailed code of the page here https://gist.github.com/bighug/94e31fe6fe64f6d11d9c please go to this link and learn how to use it. If you want to edit any template file of DW Question Answer, please copy template files from wp-content/plugins/dw-question-answer/inc/templates/default/ to /dwqa-templates/ and edit it ( eg: submit-question.php )

Guru
replied 8 years ago

Thank alot BigHug for the code, you are a star!! 🙂

Just on the other hand if you only wanted to show 5 specific tags and exclude all others what code would you use?

Best regards,
Guru

BigHug
replied 8 years ago

hey Guru, if you had a list of 5 tags in your hand, you can print it out directly by using a for() loop

Powered by DW Question & Answer Pro