How to add template as argument Acf Builder instead of post id?

<?php

namespace App;

use StoutLogic\AcfBuilder\FieldsBuilder;

$about = new FieldsBuilder('about');

$about
    ->setLocation('post_type', '==', 'page')
        ->and('post', '==', '24');
  
$about
    
   ->addFields(get_field_partial('partials.about'));

return $about;
1 Like
$about
    ->setLocation('post_template', '==', 'banana')
        ->or('page_template', '==', 'apple');

It worked with:

$about
 ->setLocation('page_template', '==', 'views/about.blade.php');
2 Likes

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