پرش به محتویات

"Filter: bricks/render_header"

HTML ارائه شده قالب سرصفحه Bricks را فیلتر می‌کند. این به شما امکان می‌دهد تا هدر را در نشانه گذاری سفارشی قرار دهید یا خروجی آن را قبل از بازتاب آن در صفحه تغییر دهید.

پارامترها

  • $header_html (string): The rendered HTML of the header.

نمونه استفاده

add_filter( 'bricks/render_header', function( $header_html ) {
    // Example: Add a notification bar before the header
    $notification = '<div class="notification-bar">Welcome!</div>';

    return $notification . $header_html;
} );