• Hello,

    I’m trying to figure out which file I need to edit to create a call similar to <? get_header(); ?> where it would pull in a custom .php include I create whenever needed.

    Which WordPress file do I need to edit to create that?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • I think what you are looking for is functions.php? Of course, that would only work on the specific theme, so if you want to make it work on more than one theme you would need to edit the core files (which would get overwritten at update).

    ~Shane Hudson

    You could plonk some extra functions into a plugin, they’d be available to all theme’s and other plugins as long as it remains active..

    Just ensure you name your functions and variables uniquely enough that they won’t conflict with others.

    Only requirement for a plugin file to activate and register into the plugins list is the name at the top of the file..

    /*
    Plugin Name: My Plugin File
    */

    NOTE: You should aim to use <?php and not shorthand tags as a matter of good practice, since not all servers have them enabled.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to Create a WordPress Call Similar to <? get_header(); ?>’ is closed to new replies.