This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('acf/settings/load_json', 'my_acf_json_load_point'); | |
function my_acf_json_load_point( $paths ) { | |
// remove original path (optional) | |
unset($paths[0]); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('acf/settings/save_json', 'my_acf_json_save_point'); | |
function my_acf_json_save_point( $path ) { | |
// update path | |
$path = get_stylesheet_directory() . '/my-custom-folder'; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Override folder that WooCommerce will check if there are any override WooCommerce's template files. | |
* WordPress initially detects theme in themes/sage/resources follow Sage's config. | |
* @see resources/functions.php:65 | |
*/ | |
add_filter( 'woocommerce_template_path', function($template_path) { | |
$template_path = 'views/woocommerce/'; | |
return $template_path; | |
}, 10); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
use Sober\Controller\Controller; | |
class FrontPage extends Controller | |
{ | |
/** | |
* This function will be represented as $test_variable in single-product.blade.php file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
use Sober\Controller\Controller; | |
class FrontPage extends Controller | |
{ | |
/** | |
* This function will be called on front-page.blade.php by this way: FrontPage::custom_title(). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@extends('layouts.app') | |
@section('content') | |
<h2>{{ $custom_title }}</h2> | |
@include('partials.page-header') | |
@if (!have_posts()) | |
<div class="alert alert-warning"> | |
{{ __('Sorry, no results were found.', 'sage') }} | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
use Sober\Controller\Controller; | |
class FrontPage extends Controller | |
{ | |
/** | |
* This function will be represented as $custom_title variablr inside front-page.blade.php file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<header class="banner"> | |
<div class="container"> | |
<a class="brand" href="{{ home_url('/') }}">{{ get_bloginfo('name', 'display') }}</a> | |
<nav class="nav-primary"> | |
Blade template header. | |
@if (has_nav_menu('primary_navigation')) | |
{!! wp_nav_menu(['theme_location' => 'primary_navigation', 'menu_class' => 'nav']) !!} | |
@endif | |
</nav> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html @php(language_attributes())> | |
{{-- Meta include --}} | |
@include('partials.head') | |
<body @php(body_class())> | |
{{-- Header include --}} | |
@php(do_action('get_header')) | |
@include('partials.header') | |
<div class="wrap container" role="document"> | |
<div class="content"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@extends('layouts.app') | |
@section('content') | |
@include('partials.page-header') | |
This is a custom content for archive page. | |
@if (!have_posts()) | |
<div class="alert alert-warning"> | |
{{ __('Sorry, no results were found.', 'sage') }} | |
</div> | |
{!! get_search_form(false) !!} |
NewerOlder