• Saad Mahmud

    (@sayeedmahmudsaad)


    Hello There,
    I am recently working on a project where I need the hook ‘wp_footer’ to use in a file. Think of it as themes/themename/working.php. I can easily work with this hook in the functions.php But in that case I need it on work.php. Is it Possible? Another question is can I use conditional action hook in the same page?
    Thanks in advance, Have a good day.
    Saad

    • This topic was modified 2 years, 5 months ago by Saad Mahmud.
    • This topic was modified 2 years, 5 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 2 replies - 1 through 2 (of 2 total)
  • The answer to the question depends on how the working.php file is included in your wordpress? Do you include it? If so, where and when?

    You can do it in a plugin. You can run about anything in a plugin that you are running in functions.php. The only thing you really need is to add a header to the php file with the plugin name. The general rule is if it theme specific add it to functions.php. But, if it something that needs to run regardless of the theme put it in a plugin.

    You can find the handbook for plugins here . If you are going to distribute it you can add the other information for the header but also you really need is /* plugin name: <name>.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How can I work with do_action() in other Page. (Not in functions.php)’ is closed to new replies.