You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
cosmopet-architecture/wp-content/themes/cosmopet/page.php

35 lines
982 B

<?php
/**
* The template for displaying all pages.
*
* This is the template that renders pages using Timber (Twig).
*/
/* TO_DO сюда перенести логику home.php */
$context = Timber::context();
$context['post'] = Timber::get_post();
if (is_account_page() && !is_wc_endpoint_url()){
include_module('profile');
$orders_pg = false;
include_component('profile', 'profile');
}
else if (is_account_page() && isset($wp->query_vars['orders'])){
include_module('profile');
$orders_pg = true;
include_component('profile', 'profile');
}
elseif (is_account_page() && isset($wp->query_vars['subscriptions'])){
include_module('profile');
include_component('profile', 'subscriptions');
}
elseif (is_account_page() && isset($wp->query_vars['view-subscription'])){
include_module('profile');
include_component('profile', 'subscription_single');
}
else{
Timber::render('page.twig', $context);
}