• Is there a way to add a favicon to the Age Gate template? I’ve tried adding it with the pre_age_gate_custom_field filter, but no luck.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Phil

    (@philsbury)

    Hi @bigskillet,

    How do you normally set your favicon, do you add it to customizer or is it hard coded somewhere like header.php?

    Thanks
    Phil

    Thread Starter bigskillet

    (@bigskillet)

    Hard coded in the header.php template.

    Plugin Author Phil

    (@philsbury)

    Hi @bigskillet,

    There’s two options here then.

    Option 1 is to put age gate into Javascript mode in the advanced settings. That’ll be job done really.

    Option 2 is to not hard code the favicon and add it into wp_head from functions.php (or a plugin/class/wherever is sensible for your setup):

    
    add_action('wp_head', 'insert_theme_favicons');
    function insert_theme_favicons() {
       ?>
       /* Add favicon code here */
       <link rel="icon" href="/path/to/icon/32x32.png" sizes="32x32" />
       <link rel="icon" href="/path/to/icon/192x192.png" sizes="192x192" />
       <link rel="apple-touch-icon" href="/path/to/icon/180x180.png" />
       /* etc etc */
       <?php
    }
    

    Thanks
    Phil

    Thread Starter bigskillet

    (@bigskillet)

    Javascript mode was blowing up the page, so I went with the wp_head option.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Age Gate Favicon’ is closed to new replies.