• I would like to insert a code block from my plugin, the code block needs to be added to the page header but can’t find an appropriate way to call it.
    i need to target
    <header id="branding" role="banner"">
    and have my html inserted right after this
    or at least inside
    <div id="page" class="hfeed">

    is there a way to do this or will i need to create a custom header?

    TIA

Viewing 1 replies (of 1 total)
  • i use this function:

    <?php
    function addfavicon() {
    	if (is_single() || is_page()) { /* If Post or Page */
    		 echo '<link rel="shortcut icon" href="' .bloginfo('stylesheet_directory'). 'images/favicon.ico">';
    	}
    }
    add_action('wp_head', 'addfavicon', 1);
    ?>

    dose this helps?

Viewing 1 replies (of 1 total)

The topic ‘How to inject /insert code into header using a function’ is closed to new replies.