Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Incuding a .php on every page without include()

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #32119
    jamygolden
    Member

    I want to include a file on every page. I’ve come across this htaccess trick:

    php_value auto_prepend_file /usr/www/users/website/includes/functions.php

    To my delight, it works perfectly. I would just like to know what the standard practice is. How does wordpress achieve this?

    #53991
    Bob
    Member

    Doesn’t WordPress uses things like get_footer() to include the footer on every page? Don’t know if thats exactly what you’re looking for though.

    #53993
    jamygolden
    Member

    I’m not using WordPress. I asked if anyone knows hoe WordPress achieves this.

    #53994
    TheLeggett
    Member

    It’s loaded in the wp-settings.php file.

    // Load the functions for the active theme, for both parent and child theme if applicable.
    if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists( STYLESHEETPATH . '/functions.php' ) )
    include( STYLESHEETPATH . '/functions.php' );
    if ( file_exists( TEMPLATEPATH . '/functions.php' ) )
    include( TEMPLATEPATH . '/functions.php' );
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Back End’ is closed to new topics and replies.