• Warning: Don’t use get_header, get_footer, get_sidebar or get_search_form. You should use layouts and partials instead: use_layout and get_partial in /wp-content/plugins/phamlp-for-wordpress/warnings_hooks.php on line 14

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Dana Ross

    (@csixty4)

    Someone’s using this plugin?

    You made my day.

    Unfortunately, you can’t use get_header, get_footer, get_sidebar, and get_search_form with this plugin. When WordPress goes to load the other theme files, like comments.php, it uses a hook called “template_include” to let plugins & themes specify a different file instead.

    get_header, get_footer, and the other two are older parts of the theming system, and they don’t allow their files to be overridden.

    My PHAMLP plugin provides a use_layout($name) function which can be used instead. Name your header file “layout-header.haml.php” and call use_layout(“header”) instead of get_header.

    Thread Starter Tobias Bohwalli

    (@tobias-bohwalli)

    Thanks for the reply, I was going to deploy a quick personal website with WordPress and found this contribution essential (I like clean code) but notice that you really have to hack and patch them all (if you run WP in debugmode) so I dropped the whole idea and built everything in Rails3 instead ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Broken/bug’ is closed to new replies.