ARN Smart Support
Language: English

Hooks and filters for developers

Updated 8 Nov 2026 5 min read
Browse Vendix Theme articles

Vendix Theme opens its places to plugins and child themes. This reference lists the documented hooks. The theme's readme FAQ and the notes in its code describe each one in more detail.

Print a layout in a theme location

The vendix_theme/location filter gets the location names of the Elementor Theme Builder: header, footer, single and archive. A plugin that prints its own layout for the location returns true; the theme then draws nothing of its own there.

add_filter( 'vendix_theme/location', function ( $printed, $location ) {
	if ( 'header' !== $location ) {
		return $printed;
	}

	// Print your header here.
	echo '<header class="my-header">…</header>';

	return true;
}, 10, 2 );
  • header and footer run on every page.
  • single runs for a post, a page (the cart, checkout and account pages too), an attachment or another post type entry, a product and the 404 page.
  • archive runs for the posts page, post archives, search results, the shop and product categories and tags.
  • A location name does not say which kind of page is shown. Choose your template from the request (the post type, is_404(), is_cart() and the like) and return false for the others.
  • When single or archive is printed, the theme prints only its header and footer around it.
  • current_theme_supports( 'vendix-templates' ) tells that the theme works this way.

A plugin layout comes first, then the Elementor Theme Builder, then the theme's own part.

Actions

ActionWhere it runs
vendix_theme/header_beforeBefore the theme header, outside it
vendix_theme/header_after_brandingIn the header row, right after the logo or site title
vendix_theme/header_actionsAt the end of the header row; parts stand together in the .vt-header-actions group
vendix_theme/header_afterAfter the theme header, outside it
vendix_theme/footer_beforeAfter the content and before the footer, whoever draws the footer
vendix_theme/single_before_contentJust above the text of a post, with the post ID
vendix_theme/single_after_contentJust below the text of a post, with the post ID
vendix_theme/post_metaEnd of the meta line of a post, with the post ID
vendix_theme/card_metaEnd of the meta line of a post card, with the post ID
vendix_theme/news_*The news places on News / Magazine sites: news_top_bar, news_ticker, news_post_meta, news_card_meta, news_before_content, news_after_content

The header actions run only when the theme draws its own header. A minimal header, for example on the plain checkout, shows no header row actions. A transparent header lies over the top of the page and covers a part printed before or after it; check vendix_theme_header_transparent() first and leave the part out, as the theme does with the news top bar.

The post actions run on every site type. On news sites the vendix_theme/news_* actions stay where they are; the general ones come after them, except vendix_theme/single_after_content, which comes before vendix_theme/news_after_content.

Filters

FilterWhat it changes
vendix_theme/site_typeThe site type: business, store or news
vendix_theme/defaultsThe default value of every theme option, with the site type
vendix_theme/header_minimalWhether the theme header shows only the logo or site title
vendix_theme/footer_minimalWhether the theme footer shows only the footer text
vendix_theme/page_options_post_idThe post whose Page Layout options apply, for views a page stands for, such as the shop
vendix_theme/paletteThe design system colors of the block editor palette
vendix_theme/setup_urlThe address of a plugin's guided setup for the welcome page
vendix_theme/setup_completeWhether the plugin's guided setup is finished, which hides the setup notice

Plugins can also read the site type with vendix_theme_site_type().

Give the theme your colors and fonts

  • Colors: the vendix_theme/palette filter gets an empty array. Return the design system colors as key and hex color, with the keys primary, secondary, accent, heading, text, muted, border, bg_light and bg_dark. The theme takes every valid hex color for the block editor palette and keeps its own palette when none is given. The site itself reads the --vendix-color-* CSS variables.
  • Type: set CSS variables on the root element, --vendix-type-{body|h1|h2|h3|h4|h5|h6|menu}-{family|size|size-tablet|size-mobile|weight|line-height|letter-spacing|transform}, each only when it has a value. The theme reads them for the body text, the headings, the theme menu and the text, title and headings of news posts, with its own values as the fallback. Tablet sizes apply up to 1024 pixels and phone sizes up to 767 pixels.

CSS hooks

HookWhat it tells
vt-sticky-header class on <html>A sticky theme header is shown
--vt-sticky-header-height variable on <html>The height of the closed sticky header, for parts that stick below it
vt-menu-open class on <html>The phone menu is open
vt-header-slot classA region beside the logo: on desktop the menu moves to its own row, on tablets and phones the region takes a full row
--vt-back-to-top-offset variableMoves the back to top button up, for plugin parts fixed at the bottom of the screen
vt-type-business, vt-type-store, vt-type-news classes on <body>The site type

The sticky header class and variable are missing when the header is not sticky, when a plugin or the Elementor Theme Builder draws the header and when the header is hidden.

On this page

Submit a ticket

Create a new support request without needing a portal account.

Priority
Attachments
Only you and our staff see a ticket. Never send passwords or licence codes.

Track a ticket

Use the ticket number and password from your confirmation email.

The number and the password are in your confirmation email.

Sign in

Access your support portal account.

New here?

Create account

Create your support portal account.

Already have an account?

Forgot password?

We email you a link to choose a new password.

Conversation

Was this helpful?
Open full article
↑ ↓ to moveEnter to openEsc to close