How To Change the Text of Elements in Quiz Cat

  1. Home
  2. Knowledge Base
  3. Quiz Cat
  4. Features
  5. How To Change the Text of Elements in Quiz Cat

We’ve included a both a shortcode, and a filter, that enables most Quiz Cat text to be changed easily. Use the shortcode option to change the text of elements when you post individual quizzes. Use our filter to make your changes permanent, and apply to all quizzes.

Before you begin:
Both of these methods will work for all free and premium customers.

Changing the text using a shortcode:

This option lets you change any, or all, of the individual text elements in Quiz Cat, when you paste the shortcode into your page or post. Normally your Quiz Cat shortcodes look like this:

[quiz-cat id="9999"]

By adding to this you can specify what you would like Quiz Cat to say instead. For example:

[quiz-cat id="9999" start_quiz="Begin the Challenge" correct_answer="The Winning Answer!"]

This will change the ‘Start Quiz’ button to say ‘Begin the Challenge’. And the ‘Correct Answer’ will change to ‘The Winning Answer!’. Changes made this way apply only to this posting. It’s a great way to easily change the feel of a single quiz.

Here all the supported fields for everything in Quiz Cat. The actual text of each element is Highlighted in Orange, these are what you will change.

    no_quiz_found="No Quiz Found"
    correct="Correct"
    wrong="Wrong"
    your_answer="Your Answer:"
    correct_answer="Correct Answer:"
    question="Question:"
    next="Next"
    you_got="You got"
    out_of="out of"
    your_answers="Your answers"
    start_quiz="Start Quiz"
    retake_quiz="Retake Quiz?"
    share_results="Share Results"
    i_got="I got"
    skip_this_step="Skip This Step"
    your_name="Your name?"
    your_email="Your email?"

Changing the text using a WordPress filter:

If you want to change the default text for all your quizzes everywhere you should use our filters. This is also a great way to translate Quiz Cat. We have one filter to change the Social Sharing text, and another filter for all the other buttons, fields, and other miscellaneous texts you may want to change.

Don’t know how to code? That’s OK, we’ve done all the hard work for you! Just use our code as is and make the necessary changes. The actual text of each element is again Highlighted in Orange, these are you will need to change.

For the code to work, you will need to access your Website via FTP, and paste the custom code you have created into the bottom of the functions.php file located inside your theme. This is usually found under wp-content/themes/my-cool-theme. Your web hosting provider should be able to help out with this part if you are unsure how to proceed.

Once your custom code is saved in the functions.php file of your theme, it will take effect immediately.

Social Sharing:


function my_quiz_cat_share_filter( $string ) {
    return $string . ' My custom quiz text! #quizcat';
}
add_filter( 'fca_qc_share_text', 'my_quiz_cat_share_filter' );

You will note the $string there. That reproduces our original code:

$quiz_text_strings['i_got'] . " {{MY_QUIZ_RESULT}} - $quiz_title"

You can leave the original text, like our example, or you may remove it and create a completely customized message.

Changing most anything else:


function my_quiz_cat_filter( $array ) {
    $array['no_quiz_found'] = "No Quiz Found";
    $array['correct'] = "Correct";
    $array['wrong'] = "Wrong";
    $array['your_answer'] = "Your Answer:";
    $array['correct_answer'] = "Correct Answer:";
    $array['question'] = "Question:";
    $array['next'] = "Next";
    $array['you_got'] = "You got";
    $array['out_of'] = "out of";
    $array['your_answers'] = "Your answers";
    $array['start_quiz'] = "Start Quiz";
    $array['retake_quiz'] = "Retake Quiz?";
    $array['share_results'] = "Share Results";
    $array['i_got'] = "I got";
    $array['skip_this_step'] = "Skip This Step";
    $array['your_name'] = "Your name?";
    $array['your_email'] = "Your email?";
    
    return $array;
}
add_filter( 'fca_qc_quiz_text', 'my_quiz_cat_filter' );

Need assistance with this or anything else? Feel free to contact our support team at https://fatcatapps.com/support/

Was this article helpful?

Related Articles