CM Answers (CMA) - Theme - Advanced - How to Change Plugin Theme Template


How to Change CM Answers Theme Template

Back to User Guide

Learn More

This feature requires experience with CSS and PHP. 

General Support - Advanced - Creating and Editing Custom Templates

Video Use-Case

Why Do It?

CM Answers allows you to change your index and thread pages template while continuing to upgrade versions of the plugin. This gives you complete control over those pages.

Really Simple Example Of Changes


Required Plugin Settings

Some settings are required in order for the plugin to search and apply the custom theme.

Under the Appearance tab, set the template as CMA default to the pages where you will apply the custom theme.

Under the  Miscellaneous section, mark Support overriding as yes. This will make the plugin apply the custom templates if they are found available.

You can also disable the app.css to include your own css file instead. 


Instructions

First, let's find the relevant files to be copied. They are located under  wp-content/plugins/cm-answers-pro/views/frontend/answer. Copy:

  • index.phtml (for Questions)
  • single.phtml (for Answers)
  • meta folder
  • widget folder

Now create the sub-directory “CMA/answer” inside your current theme directory. It should be under wp-content/themes/(active theme)/

Then, paste the files and folders there. 

End Result

The end result should be this:

Case-Sensitive

The directory structure must be (active theme)/CMA/answer.

Different letter cases such as /cma/Answer will not work.


Editing Files

Now you can edit the files index.phtml (for Questions) single.phtml (for Answers). This requires experience with CSS and PHP. 

Example

The example from the start of the article includes these simple changes to the index.phml file:

Learn more about editing templates General Support - Advanced - Creating and Editing Custom Templates


Get more information about the CM Answers WordPress Plugin

Find other WordPress products at the CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

Visit our support center to open a Support Ticket
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us