Skip to content
A WordPress plugin wrapper for Mother Jones' News Quiz library.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
css
js
tests
.gitignore
README.md
contributing.md
license.txt
news-quiz.php
phpunit.xml
readme.txt
release.sh

README.md

News Quiz

A wordpress plugin wrapper for [Mother Jones' News Quiz] (https://github.com/motherjones/newsquiz) library.

Usage

Basic Usage: Use the following shortcode where you'd like a quiz to be placed:

[quiz key="0AvfAWkLLRik_dGtjRVNUamJwbE1wRWxtVVRURG1UU0E" align="alignright"]

Replace the key and alignment attributes with your own.

See Mother Jones' documentation for instructions on how to set up the quiz.

Attributes

  • key: (required) A link to a publicly published google doc from which to pull the quiz content from.
  • title: (optional. default: blank) Give your quiz a title.
  • lede: (optional. default: blank) A subhead for the quiz.
  • align: (optional. default: alignnone) Align the quiz with alignleft,alignright or alignnone.
  • layout: (optional. default: sidebar) The values either fullwidth or sidebar.
  • answerstyle: (optional. default: bullet) Choose between alpha,bullets,roman, or numbers.
  • byline: (optional. default: blank) Give an author byline at the bottom.
  • source: (optional. default: blank) Attribute a datasource.

Styling

The base plugin comes with a very limited stylesheet, to make it easier to apply custom styles.

The DOM inherits a framework for future interactables, with a header, headline, lede and footer:

aside.news-quiz
	header.news-quiz-header
		h3.news-quiz-headline
		p.news-quiz-lede
	div.news-quiz-content
		<!-- Mother Jones DOM -->
	footer.news-quiz-footer
		div.news-quiz-byline
		div.news-quiz-source

Where possible, use these classes to apply styles, ensuring future Largo interactive embeds have a similar look and feel.

Built by and credits

Built by Will Haynes on top of Mother Jones' news quiz library.

You can’t perform that action at this time.