Template paths contain `app`

Howdy folks,
I’m working on a site I inherited that is a modified version of Sage 9 that is set up to run on WordPress.com VIP GO. In order to run on VIP, we can’t use Bedrock, and have to adhere to their strict WordPress file structure. All of the typical WordPress template functions (i.e. get_template_directory().) for returning theme paths are injecting /app/ in the path; i.e. https://example.com/app/wp-content/themes/sage/resources/assets/scripts/script.js.

Is there any way to remove this? I’d rather not hardcode the whole path.

I combed through the Roots functions in the vendor directory but what is in there is a little beyond my skill set.

AFAIK there’s nothing in base Sage that would do this; app for your theme, plugins, etc, is a Bedrock convention, and Sage is intended to be agnostic in that regard.

In Bedrock, I believe that’s configured here: https://github.com/roots/bedrock/blob/dfc961be6825a00d592fff95546ba9b1e3063866/config/application.php#L59 It looks like it just sets a constant, so perhaps in your situation someone is setting that constant elsewhere? Sage also allows you to configure some paths for things in config so maybe someone modified this? https://github.com/roots/sage/blob/master/config/assets.php

That is what I thought, which is why I was asking. It doesn’t make sense why or where it is coming from. Config files look as expected.

I did a full theme search and nothing turned up. I’ll keep looking.


Ugh, its my Lando absolute path. : (

It just happens to be the same name as Bedrock file structure and the Sage namespace App. Too many things called “App”.

This topic was automatically closed after 42 days. New replies are no longer allowed.