“Q-and-A” Documentation by “Dameer DJ” v1.0

“Q-and-A - WordPress theme”

Created: March, 10, 2013
By: Dameer DJ
Email: dameer@presswordthemes.com

Thank You for purchasing my theme! Hopefully you gonna enjoy as much as I have by creating it! If you have any questions that are beyond the scope of this help file, please feel free to email via my user page contact form here.

Be sure to read this documentaion carefully - including FAQs section and Tips - before asking for my assistance. I'm sure you'll be able to handle many "problems" quickly just by getting familiar with documentation.

Table of Contents

  1. Introduction
  2. Requirements
  3. Install Q-and-A theme
  4. Demo upload
  5. Create mandatory Pages
  6. Theme Options
  7. Shortcodes
  8. Custom Templates
  9. Sidebars
  10. Resources
  11. Tips
  12. FAQs

A) Introduction - top

Q-and-A is a simple and powerful question-and-answers-like WordPress theme. It doesn't really matter whether you are about to run specific niche Q-and-A site (like math, coding, marketing, etc.) or a simple questions and answers site relating to the product you sell, I'm sure you gonna find this theme extremely useful. Moreover, what you can end up with is a small or even large scale community site that binds people who share the same interest.

Both Questions and Answers are posted via theme's front-end which means site users will never reach the dashboard. By answering the question users collect reputation points. Of course, only if their answer is good enough! Otherwise the reputation could go down which is bad. Answer that gets accepted by the question author should bring the greatest score.
Everyone willing to participate in your Q-and-A site must be registered. Only the official site registrants can participate actively and maintain their profile page (password, age, location, bio, etc.)!

Theme's Options let site Admin(s) to upload site logo, favicon, change all the colors, font size and family (title, content, links), handle reputation points, customize main navigation, min and max number of chars relating to user inputs, etc. Literally, it's the matter of minutes to customize look and feel of the theme without any knowledge of CSS or HTML.

You've got a tool (I dare to say the real WordPress driven application), you've got an idea so mix all up into something cool. It's almost like having an oxydizer and charcoal dust :)

B) Requirements - top

Before you decide to install and use this theme be sure that the following requirements are met:


C) Install Q-and-A theme - top

1. Unzip archive downloaded from your Themeforest account to a local drive first. Take a look at inside of extracted folder and spot another archive "qanda.zip".

2. Now login into WordPress Admin and go to
Appearance > Themes >> Install Themes (tab) >>> Upload (sub-menu)
Browse to "qanda.zip" file, select and click Install Now.

Additional database table named PREFIX_user_activity 1 will be created upon theme installation! For a case everything goes right you should be able to see the following message on top of Themes screen:
Database table PREFIX_user_activity 1 has been created successfully!
Otherwise, an error message will notify you about the failure. If an error exist your hoster doesn't grant enough privileges for the new database table to be created. See FAQs section of this document in order find out how to install required table manually.

1 - in most cases "PREFIX_" should be "wp_" but it can also be a random alphanumeric string.

3. Be sure to Activate theme immediately after successful installation.

4. From Dashboard select
Appearance > Theme Options
...do nothing but scroll down to the very bottom of the first options screen and hit "SAVE OPTIONS" button!

D) Demo upload - top

It's not a must to import demo site content! The advantage of doing so is to automatically create all the theme required Pages, menus, minimum of content and thus reduce the time required to continue.

1. Before you proceed be sure to "clean up" previously entered Posts and Pages (some of them are auto generated by WordPress itself). It's also good idea to remove all of Widgets from sidebars too (see Appearance > Widgets)
2. Do not import demo file unless additional database table was created successfully!

You will find "qanda-demo.xml" file in "THEME_DEMO" folder (see your unzipped file). That file will be used to inflate WordPress database with dummy data that is partially used by theme's demo site.

Next, it is important to "confirm" Primary and Functional navigation!
From Dashboard select Appearance > Menus
... select Main Menu from Primary Navigation drop-down (Theme Locations panel) and Functional from Functional Navigation drop-down then hit "Save" button (see figure below). Main Menu Third menu named "Footer Menu" doesn't require an explicit declaration, it'll be used in footer Widget.

E) Create mandatory Pages - top

There's a slight difference for those who have imported demo site and those who did not. If you count yourself into those who did, simply jump over the following 4 steps! Why? Because these pages were already created by the demo upload.

  1. Create "Ask Question" page
    From Dashboard select
    Pages > Add new
    ...add page title, content if needed and from the Page Attributes panel - Template drop-down select "Ask Question Page".
    Publish. That page will be used to let users ask new Question so it's good idea to add some general rules about what's acceptable and what's not. It's up to you to decide. Ask Question Page
  2. Create "Edit Question" page
    It's identical to the step 1, except the fact that another custom template needs to be selected from Template drop-down menu. This time select "Edit Question Page" and publish. As you guess, that page is going to be used to allow users to edit their Questions.
  3. Create "Edit Answer" page
    Now add another page and apply "Edit Answer Page" template before you publish.
  4. Create "Edit Profile" page
    Finally, create the page that will help users to manage their profile. From Template drop-down select "Edit User Profile", publish and you are finished with creating madatory pages!

Declare mandatory pages in theme Options
Regardless the fact you have imported demo content and all the mandatory pages were created, they may not be found selected in appropriate "slots" of your theme Options. Beware, the following steps are crucial!
  1. Declare "Edit Question" and "Edit Answer" pages
    From Dashboard select
    Appearance > Theme Options >> Questions and Answers (tab)
    The very first two options on that page let you select Edit Question and Edit Answer pages respectively. Pages are selectable by title (not a template name)! Add Pages
  2. Declare "Edit Profile" page
    While on theme Options screen select another tab from the top - "Other"
    On top of all other optios you'll see another drop-down list. By title (not by the template name!) find the page that is going to be used as profile edit page. Edit Profile Page
  3. Don't forget to SAVE OPTIONS!!!

F) Theme Options - top

The theme uses its own Theme Options panel which you can access by navigating to Appearance > Theme Options. Theme Options panel Feel free to play around with different settings and save those that fit best to your needs!

G) Shortcodes - top

With this theme the usage of Shortcodes should be really easy because all of them are nicely integrated into text editor.
Whenever you click on certain shortcode button dialog box will be opened. Each dialog box contains message regarding usage so be sure to read before applying. All of input fields contained within dialog box are mandatory. Don't leave it empty otherwise shortcodes may not be interpreted properly (shortcode arguments will be missing!). Shortcode buttons in text editor Button Shortcode

H) Custom Templates - top

So far you should be familiar with how to use Custom Templates because you already created 4 so far; "Ask Question", "Edit Question", "Edit Answer" and "Edit Profile", remember? And if you did, you probably noticed there's more beside those four: "Contact Page" and "Full Width Page". So, it's quite easy, in case you need a ready-made contact form you'll use "Contact Page" while "Full Width Page" custom template should be used to add a page without sidebar.

Here's a short reminder on how to add any of these two... From Dashboard select
Pages > Add New
...and right before you publish the page from "Page Attributes" panel select Template that you want to use. Custom Templates

From Dashboard select
Appearance > Widgets
You'll notice 9 Sidebars and 4 Footer columns that are widget-ready and can hold an unlimited number of widgets. It's up to you to decide how available Widgets will be shared accross sidebars or footer columns.

For a case you don't find that enough and want to have more sidebars, Custom Sidebars plugin makes it possible!

J) Resources - top

JavaScript/jQuery plugins and files used by Q-and-A theme (all of them can be found inside "js" folder!):

Icons used with this theme:

K) Tips - top

  1. Always use front-end to post or edit Question/Answer
    Both Question and Answer rely on Markdown syntax. If you edit Question or Answer in Admin panel only (WP text editor) it won't be OK because Markdown remains unchanged. When edited from the front-end Question or Answer Markdown gets updated properly.
    REMEMBER: Site Admins are allowed to edit each and every Question or Answer from the front-end!
  2. Don't install plugins that use "comment_karma" column of "wp_comments" table!
    WordPress needs database to operate properly. One of WP's database tables is named "wp_comments" ("wp_" prefix can be anything else) and one of that table columns is named "comment_karma". Q-and-A theme "occupies" that very column so be sure that a plugin you install doesn't do the same. It's really, really rarely (some voting plugins) but still It'S good to know.
  3. Page without title
    Any Page can be shown without main title if you like! Use "show_title" (Name) and "no" (Value) in Custom Fields panel!
  4. Logo
    Your logo width should not exceed 340px if you want to keep it crisp and sharp. If wider, it'll be scaled down to fit the max of 340px (which makes it blurry).
  5. Prevent autopublish of new Question
    If you want to review each user Question before it gets published, untick "Autopublish new Question?" option (see Appearance > Theme Options >> Questions and Answers >>> Autopublish new Question?)
  6. More (unique) sidebars
    Custom Sidebars plugin can be really helpful here!

L) FAQs - top

Required database table coudn't be installed by theme activation. What can I do?

It looks like your hoster doesn't allow new database table to be created. You can try to login to the Control Panel - domain and hosting plan administration section - then find a link to phpMyAdmin. That online app allows you to manage your databases. Find database that is used by Q-and-A WP site and click to edit... phpMyAdmin Please note that your database doesn't need to be called "PREFIX_qanda", I've chosen that name before installing Q-and-A theme.
Once you select database used by Q-and-A theme, spot the "SQL" tab on top of the tables list. Hit it to open "Run SQL query/queries" screen. Query tab Now copy and paste the following mySQL query into the text area: CREATE TABLE PREFIX_user_activity ( id mediumint(9) NOT NULL AUTO_INCREMENT, user_id mediumint(9) NOT NULL, vote_pro_question text NOT NULL, vote_con_question text NOT NULL, vote_pro_answer text NOT NULL, vote_con_answer text NOT NULL, accepted_answers text NOT NULL, faves text NOT NULL, reputation mediumint(9) NOT NULL DEFAULT '0', PRIMARY KEY (id) ) Query

Please note "PREFIX_user_activity" in the code above! You will have to replace "PREFIX_" with whatever your other tables are being prefixed with! Table sufix must be intact : "user_activity".
In case you are still not allowed to create database table that way (chances for that are really, really small) please contact your hoster and explain the problem. It's obvious that you are unable to handle it via front-end.

What's the difference between Answer, Answer Comment and regular post Comment?

Essentially there's no difference. All of them are considered as comments and written to the same database table. All of them can be managed from Dashboard > Comments.

What is Markdown and why is it used with this theme?

According to Markdown creator John Gruber:

Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).

Everything else about Markdown can be found here!
It's quite obvious why it is used with this theme; it's clean, easy to read, write and learn.

Can I publish new Question from Admin?

Yes but there are things that you should be aware of...
Each new Question posted from the front-end contains meta-data that gets written to the Custom Field as a name-value pair. It means that you MUST enter all of them manually! Here they are:

How can I filter/sort Questions by different parameters - as seen on theme's demo site?

You will have to create new Page for each type of sorting. From Dashboard select
Pages > Add New
...and then use "Insert Questions Shortcode" button. Shortcode dialog box allows you select appropriate filter according to which questions will be listed.
At the end you'll only have to put your new filter-page into one of existing menus. Questions Shortcode

All of my Questions, Posts and Pages end up with 404 - not found error!

Go to Settings > Permalinks and hit Save Changes button. This should flush rewrite rules.

Main and Functional menus are not visible

Go to Appearance > Menus and select Main Menu from Primary Navigation drop-down (Theme Locations panel) then select Functional from Functional Navigation. Don't forget to Save Changes! You can use any other menu name for either "Main Menu" or "Functional".

I want to add/use more (other) Google fonts, can I?

Yes! Open "options.php" file for edit and go to line #66. Prepend, append or substitute new/existing font by following an existing array-like structure.

How do I translate my theme copy?

You'll need ".PO" file editor! POEdit is free, cross platform ready and simple to use. Your theme contains a subfolder named "languages" inside of which are two files: "en_EN.po" and "en_EN.mo".
Open "en_EN.po" for edit and translate everything. At the end save as "YOUR_LOCALE.po" while required (with POEdit) "YOUR_LOCALE.mo" will be rendered automatically.
You only have to ensure that "YOUR_LOCALE.mo" file resides inside "languages" folder of your theme!
What is "YOUR_LOCALE" supposed to be?
Have a look at "WordPress in Your Language" article at WP codex.

Once again, thank you so much for purchasing Q-and-A theme! As I said at the beginning, I'd be glad to help you if you have any questions. No guarantees, but I'll do my best to assist. If you have a more general question relating to my theme on Themeforest, you might consider visiting the forums and asking your question in the "Item Discussion" section.

Dameer DJ

Go To Table of Contents