Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

If you were to build a StackExchange clone site using WordPress, how would you do it?

share|improve this question
1  
I would use PHP code to do that and make use of a database, most certainly MySQL as it already come with wordpress. –  hakre Jan 10 '11 at 12:08
3  
If you are done, be sure to add it to the list of SO clones. Or use one of them, and enjoy the time you saved. –  Jan Fabry Jan 10 '11 at 12:52
    
Where did I mention I would do it from scratch? ;) –  hakre Jan 10 '11 at 13:13
    
Fitting post on topic of cloning SE Code: It's Trivial –  Rarst Jan 11 '11 at 12:32

1 Answer 1

up vote 4 down vote accepted

Using WordPress as a CMS (content management system), this would be relatively straight-forward. Just remember, straight-forward does not mean "easy" ...

Custom Post Types

One of the newest and best features of WordPress is custom post types. Rather than using a traditional post or page, I would make two kinds of custom post types - one for questions and one for answers. Obviously the question will have titles, tags, and content. The answers will just have content.

I'd also add a custom meta value to each answer to tie it to a specific question.

Both questions and answers can have comments, which works well with the existing framework

Voting

There are several different voting plug-ins available, though none really handles the meritocracy system that SO has built up. Still, any plug-in that allows you to rate a question/answer will be a good place to start. With some minor tweaking you could get it working like the up/down voting system of SO.

Meritocracy

Each user account would have to have a custom field associated with the user's reputation. This would be modified directly by the up/down vote plug-in.

Other features

The rest of the UI would be entirely up to you - it could either mirror SO completely or take on its own format. Really, once you have questions and answers presented and persisted in the database correctly, the sky's the limit.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.