Carbon_Fields\Container\Post_Meta_Container::show_on_template PHP Method

show_on_template() public method

Show the container only on pages whose template has filename $template_path.
public show_on_template ( string | array $template_path ) : object
$template_path string | array
return object $this
    public function show_on_template($template_path)
    {
        $this->show_on_post_type('page');
        if (is_array($template_path)) {
            foreach ($template_path as $path) {
                $this->show_on_template($path);
            }
            return $this;
        }
        $this->settings['show_on']['template_names'][] = $template_path;
        return $this;
    }