A bit new to this but making some progress.
Do i need to reference Location.php somewhere? $location_types is an Undefined variable.
Can’t use Location::
in non static references.
<?php
// Controllers/Location.php
namespace App\Controllers;
use Sober\Controller\Controller;
class Location extends Controller
{
public function locationTypes()
{
global $post;
$taxonomies = wp_get_post_terms($post->ID, 'location_type');
return $taxonomies;
}
public static function LocationID()
{
return "The ref ID"; // works
}
...
Blade files : single.php.blade > content-single-location.blade.php > entry-meta-location.blade.php
This works so some of controllers/Location.php is ‘available’
{!! Location::LocationID() !!}
cant get this from Class Location in Location.php but i can if added it to App.php
@if($location_types)
@php(print_r($location_types))
@endif
thanks in advance, D.