GeneratePress AI is here - Read the release post

Learn GeneratePress

Header hooks

These hooks fire around and inside the GeneratePress header, in header.php and inc/structure/header.php. For the settings that control what’s in the header, see the Header guide; for changing header values in code, see Logo and site title filters. Hooks in firing order Around the header generate_before_header GP Free The generate_before_header hook fires right before the … Read more

Excerpts and featured images filters

Filters for what shows on the blog and archive pages — excerpt length, the read more link, and featured images. Most of these are set in Blog; see the Blog Content and Featured images sections. Jump to Excerpts and read more excerpt_length GP Premium — Blog module. The excerpt_length filter (a WordPress core filter) sets … Read more

Navigation and mobile menu hooks

These hooks fire in and around the primary navigation, its mobile menu, and — with GP Premium’s Menu Plus — the secondary and slide-out navigation. For the settings that control what’s in the navigation, see Navigation; for changing navigation values in code, see Navigation and search filters. Hooks in firing order Primary navigation generate_before_navigation GP … Read more

Content wrapper hooks

These hooks fire around the site and content containers that wrap every page’s main content, in header.php and the template files (index.php, single.php, page.php, archive.php, search.php, 404.php). Hooks in firing order Site and content containers generate_inside_site_container GP Free The generate_inside_site_container hook appears just after the .site.container element. Parameters: none. Default: —. Guide: Container generate_inside_container GP … Read more

Page and archive title hooks

These hooks fire around post titles, page titles, and archive titles. Hooks in firing order Archive titles generate_archive_title GP Free The generate_archive_title hook exists inside the archive.php file, and is used to insert the archive title. Parameters: none. Default: —. Guide: Content generate_before_archive_title GP Free The generate_before_archive_title hook appears before the archive title on archive … Read more

Layout, sidebars, footer and widgets filters

Filters for sidebar layout and width, widget titles, and the footer widget areas. Jump to Sidebars generate_sidebar_layout GP Free The generate_sidebar_layout filter allows you to set your sidebar layout. Parameters: $value (string). Default: Your sidebar layout set in the Customizer or meta box. Guide: Sidebars generate_left_sidebar_width GP Free The generate_left_sidebar_width filter allows you to set … Read more

CSS classes and markup filters

Filters for the CSS classes GeneratePress adds to its structural elements, and for schema/markup output. Jump to CSS classes generate_header_class GP Free The generate_header_class allows you to add to the classes in the #site-header element. Parameters: $value. Default: an array of the theme’s own CSS classes for this element. Guide: Developers generate_inside_header_class GP Free The … Read more

Logo and site title filters

Filters for the logo and site title, including the GP Premium mobile header and navigation logo. Jump to Logo generate_logo GP Free The generate_logo filter allows you to change your logo. Parameters: $value (URL). Default: Your logo set in Customize > Site Identity. Related: generate_logo_output Guide: Site Identity & Logo generate_logo_href GP Free The generate_logo_href … Read more

Navigation and search filters

Filters for the mobile menu, menu locations, and the navigation search. Jump to Mobile menu generate_mobile_menu_label GP Free The generate_mobile_menu_label filter allows you to change the Menu text in your mobile menu button. Parameters: $value (string). Default: Menu. Guide: Navigation generate_mobile_menu_media_query GP Free Starting in GeneratePress 2.3, the generate_mobile_menu_media_query allows us to change when the … Read more

Admin and capabilities filters

Filters and actions for the WordPress admin — dashboard screens, user capabilities, the Customizer, and loading/updates. Jump to Actions (admin screens) generate_dashboard_after_header GP Free The generate_dashboard_after_header hook appears directly after the header in the Appearance > GeneratePress dashboard page. Parameters: none. Default: —. Guide: Developers generate_dashboard_inside_container GP Free The generate_dashboard_inside_container hook appears inside the main … Read more