Sage 10 doesn’t seem to have the template method to return so I have tried a lot of things and either returns empty or breaks the site completely. This seemed to be the equivalent from some answers on here but it breaks the site with server error 503.
The path to the template file is relative to the resources/views directory of the Sage 10 theme directory.
The constructor results in a View object whose render method returns the rendered template.
Tip: Add use function Roots\view; at the beginning of the PHP file so you can just use view(...) instead explicitly typing out the Roots namespace.
Why is there a HTTP 503? Well, on that system error reporting is disabled, as it is a production system I assume. You should always do the theme development on a development or at least staging system and not directly on production.
I guess the error comes from a missing variable expected in the template file. Or maybe a namespacing issue? You can also check the server error logs in order to find out what exactly the reason is.
The shortcode works when not in the ACF I have set up so I will have to see whats going on there, maybe there’s something weird in my loop, but it was working as is in Sage 9.
Ok it turns out its a line I added in the App class in the beginning of the project when I was trying to get ACF to work in the first place, but I don’t need it.
Btw, you should strive for enabling logging/error reporting on your development server.
And I recommend using an editor with syntax highlighting and linting or an IDE (I currently use VSCode that is free and quite fast). This helps to catch most issues while writing the code.