Posts: 54
Threads: 17
Joined: Oct 2010
The documentation page states that header is a front-end hook that is called in the head section of the page. I create a simple plugin and registered it to that hook but the output is shown in the back-office not in the front-office.
No output is generated in the front-office. I need to generate output in every page header in the front-end.
Also, are there any more docs? At least better descriptions to what the registration? I see plugin types as "theme", others as "template" or "plugins", what are the differences? How does it affect the plugin?
Rejoice! For very bad things are about to happen.
Posts: 54
Threads: 17
Joined: Oct 2010
Oh, and I do understand that the way GS works right now doesn't allow for such a plugin to function. But the documentation should be corrected.
Rejoice! For very bad things are about to happen.
Posts: 1,108
Threads: 70
Joined: Aug 2009
Hi,
Your right , it should be called "theme-header"
And it will only get called if your have
<?php get_header(); ?>
somewhere in the <head> section of your template files.
You can also just create your own hooks anywhere in your templates.
just use
<?php exec_action('your-hook-name'); ?>
Then just register you plugin with your hook name.
Posts: 54
Threads: 17
Joined: Oct 2010
I'm actually just calling the function I need, it's easier and faster considering what I currently have, thanks for the reply.
My main point is really about documentation, it's getting a bit outdated, or so it seems
Rejoice! For very bad things are about to happen.
Posts: 3,491
Threads: 106
Joined: Mar 2010
2011-01-06, 00:44:20
(This post was last modified: 2011-01-10, 07:28:09 by fotothink.)
Not getting outdated. It's just a recent error in latest update of these docs.
Two months ago I suggested Chris to make 2 separated lists of plugins, backend and frontend ones (before that, they were mixed), but apparently he had some cut-paste error, and no one realised till now. :-)
So:
- theme-header and theme-footer should be in FRONT-END list.
- header and footer should be in BACK-END list.
EDIT: These errors have been fixed.