Paths to CSS and JavaScript incorrect

After installing sage I get the following error. The link to the CSS and Javascript is located wrong. Does anyone know why it’s located to “themes/newpublic/templates/dist/…” Instead of “themes/newpublic/dist/…”. And how to fix this?

Fixed by following the steps on Github.

:innocent:

Would you please clarify the solution, I have searched the git readme, and docs, and cannot solve this issue.

I don’t know what the exact solution was. I just started a new project by following the steps on github and it worked fine.

What version of Sage are you using and what exactly are you seeing / what are you expecting to see?

I pulled the latest 8.5 branch from github last night.

I’m experiencing an issue where it seems get_template_directory() is returning the following

http://genos.nse.site/wp-content/themes/genos/templates

Not experiencing this issue with the other twenty* themes.

Did you install and activate Sage 9 prior to using Sage 8.5? Sage 8 doesn’t do anything that would cause this, but Sage 9 definitely does.

Hi @benwood, yes i did.
But I reinstalled with composer the second round.

I reinstalled wordpress, and new database, and it works.

Switching between e.g. twentyseventeen and back to the Sage theme in the dashboard solved it for me. No need to reinstall WP or anything. I seems that switching theme updates the get_template_directory() to the correct path.

Note: I also installed Sage 9 before 8.5

Thanks phaphan, this helped me!

1 Like