[Support request] Add Favicon on Page Header Setting

Home Forums Support [Support request] Add Favicon on Page Header Setting

Home Forums Support Add Favicon on Page Header Setting

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #492766
    elsa

    Hi,
    I need different favicon for particular page so I want to add the code on header page setting. How to do that?

    #492996
    Leo
    Staff
    Customer Support

    Hi there,

    Not quite sure what you mean?

    Page Headers are page specific so you can apply different page header to different pages?

    #493326
    elsa

    Hi Leo,
    I need to know how to assign favicon for each page. Thanks.

    #493370
    Tom
    Lead Developer
    Lead Developer

    You would have to use a filter like this:

    add_filter( 'option_site_icon', 'tu_custom_favicon' );
    function tu_custom_favicon( $icon ) {
        if ( is_page( 'your-page-slug' ) ) {
            return 'URL TO CUSTOM FAVICON';
        }
    
        return $icon;
    }
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.