Support » Installing WordPress » Call WP template tags from any .php file

  • Resolved aldeasim

    (@aldeasim)


    Hi everyone.
    Is it possible to echo bloginfo('url'); (or just any function) from mysite.com/thisisnotawppage.php, which is a page that is not generated by my WP installation)?
    I’m trying to call a WP template tag from a modified stylesheet with .php extension.

    Any help will be very appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You don’t have to edit anything – except the file where you want to use WP functions (template or plugin tags).
    Put at the top of it, before everything:

    <?php
    require('./path-to-your-blog/wp-blog-header.php');
    ?>

    Wow, excellent moshu! Thanks a lot! 😉

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Call WP template tags from any .php file’ is closed to new replies.