Denver Prophit Jr.
asked 6 years ago

in /inc/Posts/Question.php

public function set_rewrite() {
global $dwqa_general_settings;
if ( isset( $dwqa_general_settings['question-rewrite'] ) ) {
return array(
'slug' => $dwqa_general_settings['question-rewrite'],
'with_front' => false,
);
}
I'd like to add the current category slug into the URL. This will match the breadcrumb schema I have integrated in my copy.
How would I modify that function to do so?
1 Answers
DominicStaff
answered 6 years ago

We have created an option to help you replace the slug to the question page, categories page, and tag page in the settings of the plugin, you can go to the Dashboard > Questions > Settings then scroll down the screen to the bottom of the screen. 
See the screenshot: http://prntscr.com/h8hqgn

Denver Prophit Jr.
replied 6 years ago

That’s not what I mean. While viewing single question with answer, the URL I want to display the value of the category. example.com/category/fruit/what-are-oranges/

Dominic Staff
replied 6 years ago

I know what you want. I have checked and see that the plugin does not support this option. If you want to have it, we are ready to help you as a custom work with a charge of fee.
In case that you are still interested in the feature, please kindly let us know, we will check and estimate the time.

Denver Prophit Jr.
replied 6 years ago

ok give me an estimate to modify `/inc/Rewrite.php` to allow the category slug before the topic slug like /this-category-slug/topi-slug

Denver Prophit Jr.
replied 6 years ago

BTW I’ve added a lot of schema question and schema answer, integrated Yoast plugin check to handle breadcrumb and added featured image support on a question. Maybe we can barter.

Dominic Staff
replied 6 years ago

Ok, we will barter. I’m very happy to work with you. We are checking about the Categories slug now, you can provide me your solution to the schema question/Answer. Our technical team will check and discuss with you.

Denver Prophit Jr.
replied 6 years ago

GH user inetbiz will start creating PR’s at your GH project for this plugin. I’ll try to break up PR’s by each change I made. Featured Image on Questions, deprecated function call, schema Question & Schema Answer, Yoast SEO plugin Breadcrumbs detection.

Dominic Staff
replied 6 years ago

Please send me your email, I will send you the latest version that our technical team has updated this option to the settings of the plugin to help you enable Slug of categories, you can help me check and test the latest version.

Denver Prophit Jr.
replied 6 years ago

[email protected] Also need help with the category title in the single content question template. The normal WP function to get that isn’t working. I’ll add to commit or you can.

Dominic Staff
replied 6 years ago

I have sent the latest version of the Q&A via email, you can check your email now.

dkraken
replied 6 years ago

why does my question awaits moderation and never appears here?

Denver Prophit Jr.
replied 6 years ago

Dominic, no email received. I checked spam. [email protected]

Dominic Staff
replied 6 years ago

I have shared a google drive link to your email, you can check and download the latest version of the plugin now.

Denver Prophit Jr.
replied 6 years ago

All schema work I had done isn’t in that version. Not even yoast seo detection. I’ll go back in my own copy and merge my changes back into my copy. Where do you want to communicate privately on the matter or continue to give feedback in this Q&A thread?

Dominic Staff
replied 6 years ago

You can contact via email: [email protected]

Powered by DW Question & Answer Pro