Use WordPress theme functions externally.

If you want to call any wordpress function outside , you need to have access of its wp-load.php file which load all wordpress functions.

Suppose, you want to display header and footer of wordpress website in your web browser.

1. Create index.php

2. Copy, this code to index.php file which fetch its parts.

define('WP_USE_THEMES', false);

You can call any part of wordpress like sidebar but you just need to find out its function name and call it in the required file.


1 thought on “Use WordPress theme functions externally.”

Leave a Reply

Your email address will not be published. Required fields are marked *