• I am just getting started with WP and am new to PHP (though I am a computer programmer so I’m not afraid to get under the hood).

    I’m wondering about some best practices.

    1. In one file I needed to use some functions from post.php that didn’t seem to be available. I added
    require_once( dirname(__FILE__) . '/wp-includes/post.php');
    to wp-blog-header.php so that those functions would always available to any file I need (not so good I realize). Is there a built-in way to make include files globally available? Or should I have a theme-level blog-header.php to handle my includes?

    2. I want to modify the output of wp_register to say something other than ‘Register’ and to provide a title attribute for accessibility. How do I do this? I see that you can modify the before and after, but I want to do some string replacement.

    3. Similarly, I tried strtolower(the_date(‘l, j F Y \a\t g\:i a’) but the date still displays with uppercase days and months. How do I make that work?

    4. Finally, if you have any pointers to WP best pratices, please let me know.

    Thank you

  • The topic ‘Best practices?’ is closed to new replies.