Get Theme Directory In WordPress

Paulund is full of premium tutorials and support to help with your development

Sign up to get full access to all tutorials.

Get full access for $5/mo

Login to your account

Manage Themes ‹ Dev WordPress — WordPress

When you doing theme development there are times when you need to reference a file in the same folder of the current theme. You may need to include a file in your code or add a stylesheet to your website. There are many different ways you can include a file in your code, WordPress comes with a number of constants that you can use in your development to get paths to your wp-content folder or plugin folders. This content is restricted to subscribers