tonik / theme

Tonik is a WordPress Starter Theme which aims to modernize, organize and enhance some aspects of WordPress theme development.
http://labs.tonik.pl/theme/
MIT License
1.33k stars 140 forks source link

Issue with asset_path #75

Closed multiplehats closed 6 years ago

multiplehats commented 6 years ago

Hey all,

Thanks for this great starter theme! Loving it so far.

I'm on a brand new WP install and a clean Tonik.

I'm following the docs and trying to:

use function Tonik\Theme\App\asset;
$path = asset_path('css/app.css');

However, it returns: Fatal error: Uncaught Error: Call to undefined function asset_path()

How come?

multiplehats commented 6 years ago

Okay. Boom, I got it working. I was a bit confused for a sec. Thanks 👍

jedrzejchalubek commented 6 years ago

There is an error in documentation. You have to import proper asset_path function like this:

use function Tonik\Theme\App\asset_path;