QuireDocumentation

Going further

Child theme and code

This page is for people who change code. You do not need any of it to build a site with Quire.

Small style changes#

For a few lines of CSS, use Appearance > Customize > Additional CSS. WordPress keeps this CSS when you update the theme, and you do not need the child theme for it.

To change colors, fonts, or the text size, use the settings in Appearance > Customize > Quire instead of CSS. The theme mixes all its softer tones from your colors, so everything stays in tune. See Colors and Typography.

The child theme#

The download includes quire-child.zip. Install it as described in The child theme. Keep the Quire parent theme installed: the child theme only adds to it.

The child theme holds four files:

  • style.css: your CSS. It loads after Quire's own styles and after the Customizer's CSS, so your rules win without extra specificity.
  • functions.php: your PHP. It runs before the parent's functions.php. It already loads the child stylesheet (as the quire-child style, which depends on the parent's quire style) and the child's own translations from quire-child/languages/.
  • readme.txt: a short description of the child theme.
  • screenshot.png: the image on the Appearance > Themes screen.

When you update Quire, the child theme is not touched.

Activate the child theme first

WordPress saves the Customizer settings for each theme on its own. If you set up the site with Quire and then activate Quire Child, the Customizer starts again from the default settings. Activate Quire Child before you import the demo or change the Customizer. If it is too late, see the fix in Troubleshooting.

Browsers keep your old CSS#

The child stylesheet loads with the child theme's version number in its address (?ver=1.0.0). Browsers may keep the old file after you edit it. Raise the Version line at the top of the child's style.css after a change, for example to 1.0.1, and every browser loads the new file.

Override a template file#

Copy a file from quire/ to the same place in quire-child/, then change the copy. WordPress uses the child's copy. You can override:

  • The main templates: 404.php, archive.php, archive-quire_project.php (the work archive), comments.php, footer.php, header.php, home.php (the blog), index.php, page.php, search.php, searchform.php, sidebar.php, single.php, single-quire_project.php (a project), and taxonomy-quire_discipline.php (one discipline).
  • The parts in template-parts/:
    • content/: card.php, row.php, and list.php (the blog card, row, and list item), single.php (a post), page.php, search.php, none.php (nothing found), and home-head.php.
    • header/: bar.php (the header bar) and menu.php (the phone menu).
    • footer/: footer.php.
    • project/: layout-case.php (the Case study layout), layout-gallery.php (the Gallery first layout), content.php (the project text), and locked.php (a project with a password).
  • The two page templates in page-templates/: blank.php and canvas.php.

The files in quire/inc/ load from the parent folder, so a copy in the child theme is not used. To change what they do, override a function or use a hook, as shown below.

Copies do not update

A copied file keeps the old code when Quire updates. Copy only the files you need, and compare them with the new version after each update.

Override a widget#

To change the markup of one Quire widget, put a file at quire-child/quire-core/widgets/<name>.php. Start from a copy of the widget's own file, wp-content/plugins/quire-core/widgets/<name>/render.php. For example, quire-child/quire-core/widgets/quote.php replaces the Quote widget.

Inside the file, $values holds the widget's field values (already cleaned, with defaults filled in), $args holds the context (for example whether Elementor's editor is drawing it), and $schema holds the widget's field list from schema.php. The design of every widget is in the theme's CSS, so keep the class names if you want to keep the look.

Elementor can keep a saved copy of a widget's output. After you add or change an override, go to Elementor > Tools and click the button that clears or regenerates Elementor's files and data. Otherwise pages built with Elementor can still show the old markup.

Override a function#

Every function in the Quire theme is wrapped in if ( ! function_exists() ). The child's functions.php runs first, so if you define a function with the same name there, Quire uses yours. The functions of Quire Core are inside classes and cannot be replaced this way. Use the plugin's filters instead.

Hooks#

Add your hooks to the child's functions.php. Theme hooks start with quire_. Quire Core hooks start with quire_core_.

Actions#

ActionRuns
quire_before_headerBefore the header, after the "Skip to content" link. It runs on every page, also on a page that hides its header.
quire_header_actionsAt the end of the header bar, before the Menu button. The shop adds its cart link here. A good place for a language switcher or a small link.
quire_after_headerAfter the header and the phone menu, just before the page content.
quire_before_footerAfter the page content, before the footer. It runs on every page, also on a page that hides its footer.
quire_after_footerAfter the footer, before WordPress prints its own footer scripts.
quire_before_content, quire_after_contentBefore and after the text of a single post or project.
quire_before_project, quire_after_projectBefore and after a whole single project, in both layouts.
quire_share_linksWhere share links belong, with post or project as its value. Quire Core prints the share links here.

For example, this adds a line before the footer:

add_action( 'quire_before_footer', function () {
	echo '<p class="my-note">' . esc_html__( 'Open for new work from March.', 'quire-child' ) . '</p>';
} );

Filters#

Filters of the theme:

FilterChanges
quire_defaultsThe default value of every Customizer setting. The keys have no quire_ prefix, for example header_behavior or work_layout.
quire_color_presetsThe palettes in Palette. Each one has a label and four colors: paper, ink, accent, and card.
quire_font_pairingsThe font pairings in Font pairing. Each one needs label, display and text (CSS font stacks), stretch (for example 100%), and google (a Google Fonts query, or empty when you load the fonts yourself).
quire_font_stylesheet_urlThe address of a Google pairing's stylesheet. Return an empty string to load no font stylesheet. Quire Core uses it for its local copies.
quire_html_classesThe classes on the <html> element, such as quire-no-settle when an effect is off.
quire_hides_partWhether the header or the footer is hidden on the page being viewed. It receives header or footer.
quire_header_printed, quire_footer_printedWhether a header or footer was already printed in place of the theme's own. Quire Core answers true when a Header or Footer template applies.
quire_page_is_canvasWhether a page is drawn full width, without the page title. By default this is true for the Canvas template and for an Elementor page that starts with a Quire widget.
quire_shows_blog_sidebarWhether the blog sidebar shows on the page being viewed.
quire_work_archive_titleThe title of the work archive. The default is "Work".
quire_content_widthThe reading width that WordPress uses for embeds. The default is 720 pixels.
quire_reading_rateThe words a reader reads in a minute, for the reading time. The default is 200.
quire_shop_rows_per_pageHow many rows of products a shop page holds. The default is 4.
quire_social_networksThe social networks offered in Social profiles. A network you add needs an icon with the same name in quire_icons.
quire_iconsThe theme's icon set: each name with its 24 pixel outline path data.
quire_cf7_wide_typesWhich Contact Form 7 field types span both columns of a form.
quire_script_stringsThe words the theme's scripts show visitors.

Filters of Quire Core:

FilterChanges
quire_core_project_labelsThe names "Project" and "Projects" in the admin. It receives singular and plural.
quire_core_share_networksThe networks share links can be made for. A network added here also appears in the Customizer's Share links to show.
quire_core_widgetsThe list of Quire widgets. Add a widget of your own, or remove one.
quire_core_widget_valuesA widget's values just before it is drawn. It also receives the widget name and the context.
quire_core_widget_htmlA widget's finished markup. It also receives the widget name, the values, and the context.
quire_core_sidebar_widgetsThe sidebar widgets the plugin adds: Recent projects, About card, and Social links.
quire_core_shop_extra_enabledWhether a shop extra is on. It receives cart_drawer or quick_view.
quire_core_demo_requirementsThe checks shown before the demo import.

Examples#

Call projects "Case studies" in the admin:

add_filter( 'quire_core_project_labels', function () {
	return array(
		'singular' => __( 'Case study', 'quire-child' ),
		'plural'   => __( 'Case studies', 'quire-child' ),
	);
} );

Add your own palette to the Customizer:

add_filter( 'quire_color_presets', function ( $presets ) {
	$presets['harbor'] = array(
		'label'  => __( 'Harbor', 'quire-child' ),
		'paper'  => '#F1F3EE',
		'ink'    => '#1E2F3A',
		'accent' => '#D2552E',
		'card'   => '#FBFCF8',
	);
	return $presets;
} );

Make the header hide while scrolling down, by default:

add_filter( 'quire_defaults', function ( $defaults ) {
	$defaults['header_behavior'] = 'hide';
	return $defaults;
} );

A default only applies while the setting has not been saved in the Customizer.

Custom CSS#

Write your CSS in the child's style.css. Use Quire's class names, which all start with quire-. Every widget has the classes quire-widget and quire-<name>, for example quire-quote.

Write side values with logical properties, such as margin-inline-start and padding-inline-end, so your rules also work on a right-to-left site. The child stylesheet is not mirrored for you. If you need rules for right-to-left only, put them in a file named rtl.css in the child theme. WordPress loads that file by itself when the site language is right to left.

CSS custom properties#

Quire's design is built on custom properties, set on :root in assets/src/css/tokens.css. Use them in your own rules, so your CSS follows the palette and the fonts:

.my-note {
	padding: var(--quire-s2) var(--quire-s3);
	border-radius: var(--quire-r);
	background: var(--quire-paper);
	color: var(--quire-forest);
	font-family: var(--quire-font-text);
}
PropertyHolds
--quire-creamThe page color. Set by Page in the Customizer.
--quire-paperThe card color. Set by Cards.
--quire-forestThe ink: text, lines, and the dark bands. Set by Ink.
--quire-tomatoThe accent. Set by Accent.
--quire-on-accentThe text on the accent, such as button text. The theme picks the card color or the ink, whichever reads better.
--quire-sand, --quire-forest-deep, --quire-forest-soft, --quire-line, --quire-line-light, --quire-shadowSofter tones, lines, and the shadow, mixed from the colors above.
--quire-font-display, --quire-font-textThe display font (names and headings) and the text font. Set by Font pairing.
--quire-display-stretchThe width of the display font: 86% for the bundled pairing.
--quire-t-13, --quire-t-15, --quire-t-18, --quire-t-24, --quire-t-32, --quire-t-48, --quire-t-72, --quire-t-hero, --quire-t-zoomThe text sizes, from 13 pixels up to the hero headline. Set by Base size.
--quire-s1 to --quire-s20The spacing scale: s1 8px, s2 16px, s3 24px, s4 32px, s5 40px, s6 48px, s8 64px, s10 80px, s12 96px, s15 120px, s20 160px.
--quire-gutThe space at the sides of the page: 40px, 24px below 1100 pixels wide, and 16px below 820 pixels.
--quire-gapThe gap between cards: 16px, and 8px below 820 pixels.
--quire-hdrThe header height: 72px, and 64px below 820 pixels.
--quire-rThe one corner radius: 10px.
--quire-easeThe easing curve of the theme's motion.
Colors in CSS replace the Customizer

The child stylesheet loads after the Customizer's CSS. If you set --quire-tomato or another base color in the child's style.css, the Customizer's color settings stop having an effect on it. To change a color, use the Customizer, or add a palette with quire_color_presets.

The readable sources#

Quire ships its readable source files next to the built ones:

  • quire/assets/src/css/: the styles, one file per part (header, menu, forms, blocks, and others), with tokens.css for the custom properties and widgets/ for one file per widget.
  • quire/assets/src/js/: the scripts, with widgets/ for one file per widget that moves.

The site loads the built files in quire/assets/css/ and quire/assets/js/. It uses the minified copies (.min.css and .min.js), or the readable built copies when SCRIPT_DEBUG is on in wp-config.php. Read the sources to find a class name or to see how a part works. Do not edit the theme's files: an update replaces them. Put your changes in the child theme.

The theme's script makes window.quire available. If you add content to a page with your own script, call window.quire.start( element ) to start the Quire widgets inside it.

Quire 1.0.0 documentation, updated 2026-11-07. Online at quire.jawad.work/docs/.