Title: How to access plugin function from header.php
Last modified: August 19, 2016

---

# How to access plugin function from header.php

 *  Resolved [Alexandre](https://wordpress.org/support/users/0xcafe-1/)
 * (@0xcafe-1)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/how-to-access-plugin-function-from-headerphp/)
 * Hi,
 * I’m writing my first plugin and I would like to know how to code a function so
   it’s available from anywhere on my blog.
 * For example, if I have a function like so :
 * function get_hullo() <{
    return “hullo”; }
 * And I want its value to be written to the header of a document like this :
 * <meta name=”hullo” content=”<?php if (function_exists(‘get_hullo’)) get_hullo();?
   >” />
 * Do I have to do something more, like delaring the function globally (if that 
   makes sense)?
 * thanks!

Viewing 1 replies (of 1 total)

 *  Thread Starter [Alexandre](https://wordpress.org/support/users/0xcafe-1/)
 * (@0xcafe-1)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/how-to-access-plugin-function-from-headerphp/#post-1015214)
 * D’oh! Forgot to add the “echo” to print out the returned value…

Viewing 1 replies (of 1 total)

The topic ‘How to access plugin function from header.php’ is closed to new replies.

 * 1 reply
 * 1 participant
 * Last reply from: [Alexandre](https://wordpress.org/support/users/0xcafe-1/)
 * Last activity: [17 years, 3 months ago](https://wordpress.org/support/topic/how-to-access-plugin-function-from-headerphp/#post-1015214)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
