Home » Documents » WeCodeArt Framework » Filters » Header » Header Bar Modules

Header Bar Modules

8
Views: 60

Deprecated – this filter is deprecated!

Filter name:

wecodeart/filter/header/bar/modules

Location: wecodeart/inc/core/class-header.php

This filter is used to add additional modules to header bar.
It takes an array as argument and contains a list will all header bar modules:

  • Branding (Logo/Title/Headline)
  • Menu (Primary Menu)
  • Search Field

How to use:

Each array item must have an unique key. Each item must have a label (string) and a callback (function).

function add_to_header_modules( $args ) {
$args['button'] = [
'label'    => __( 'My Button', 'domain' ),
'callback  => 'function_name' // returns the module html
];
return $args;
}

add_filter( 'wecodeart/filter/header/bar/modules', 'add_to_header_modules' );

Was this article helpful to you?

Ready to create with WeCodeArt Framework?

WeCodeArt Framework is a base WP theme, Super Fast, Optimized and ready for any shape.

Copyright © 2021 - All rights reserved. Built on WeCodeArt Framework.