Skip to main content

What Is GeneratePress

warning

GeneratePress is a parent theme. Do not edit files in /wp-content/themes/generatepress/ on production. Use a child theme or GP Premium Elements for customizations.

What GeneratePress Is (and What It Is Not)

GeneratePress is a performance-oriented WordPress theme designed to be extended without forking the parent theme.

It is:

  • A parent theme with predictable templates and hook points
  • A "system" theme: you set global defaults in the Customizer and then override selectively
  • A good fit for block-based builds (especially with GenerateBlocks)

It is not:

  • A page builder (it does not replace the editor)
  • A "do everything" theme that ships dozens of heavy features by default
  • A workflow where you should edit parent theme files
TopicWhat it meansWhere it lives
Parent themeThe baseline theme WordPress loads/wp-content/themes/generatepress/
Child themeYour customization layer that survives updates/wp-content/themes/generatepress-child/
Hook-first designCustomizations happen via actions/filtersdo_action( 'generate_*' ) / apply_filters( 'generate_*' )
Modular coreLogic is split into focused modules/wp-content/themes/generatepress/inc/
Lightweight assetsMinimal CSS/JS by default/wp-content/themes/generatepress/assets/

How GeneratePress Works

At runtime, WordPress loads the parent theme, then your child theme (if present). GeneratePress templates render the structure of the page and fire hook points. Your customizations attach to those hook points.

flowchart TD
OLS[OpenLiteSpeed] --> WP[WordPress]
WP --> GP["GeneratePress (parent theme)"]
GP --> HOOKS[generate_* hooks]
HOOKS --> CHILD[Child theme callbacks]
WP --> PLUGINS[Plugins: GP Premium, GenerateBlocks]

In practice, you usually extend GeneratePress with one of these approaches:

ApproachBest forTradeoffs
Customizer + blocksMost sitesFast iteration; settings live in DB
Elements (GP Premium)Conditional output/layout changesGreat targeting; can become hard to audit if unmanaged
Child theme or site pluginVersioned code, integrations, custom logicRequires dev workflow; needs deployment discipline
Example: hook-first customization (child theme)
<?php
add_action( 'generate_after_header', function () {
echo '<div class="notice">Free audit slots available this week.</div>';
} );
note

The key idea is not the specific hook name. The key idea is: you add behavior by attaching callbacks to known hook points.

Where GeneratePress Lives on Disk

You rarely need to read theme files, but it helps to know the map when debugging.

PathWhat it containsWhy you care
/wp-content/themes/generatepress/Parent theme codeUpgrade-safe reference, not an edit target
/wp-content/themes/generatepress/inc/Core PHP modulesWhere most theme logic is organized
/wp-content/themes/generatepress/templates/Template filesRendering structure and includes
/wp-content/themes/generatepress/assets/CSS/JS assetsPerformance profiling and overrides

Key Concepts and Terminology

TermPractical meaning
HookA named insertion point that runs your code
FilterA hook that modifies a value and returns it
Theme modsStored Customizer settings for the theme
Template overrideCopying a theme template into a child theme (high maintenance)

Common Misconceptions

  • "I should edit the parent theme once and remember it" (updates will overwrite you)
  • "More features means a better theme" (more features often means more weight)
  • "Hooks are only for developers" (Elements makes hooks usable without editing theme files)

Quick Reference

If you want to...Usually use...
Set global typography/colors/spacingCustomizer
Inject a banner/CTA conditionallyElements (Hook/Block)
Add durable code (schema, APIs, integrations)Site plugin / MU-plugin
Change layout by contextElements (Layout) or filters

What's Next