И почему такая возможность не была предоставлена по-умолчанию?
add_filter( 'default_content', 'custom_editor_content' );
function custom_editor_content( $content ) {
ob_start();
the_tags( '', ' - ' );
$tags = ob_get_clean();
$html = <<<CONTENT
<div class="content-col-main">
This is your main page content
</div>
<div class="content-col-side">
This is your sidebar content
</div>
<div class="content3">
%s
</div>
CONTENT;
$content = sprintf( $html, $tags );
return $content;
}
$customer_order = get_posts( array(
'numberposts' => 1,
'meta_key' => '_customer_user',
'meta_value' => $user_id,
'post_type' => wc_get_order_types( 'view-orders' ),
'post_status' => array_keys( wc_get_order_statuses() ),
'orderby' => 'ID',
'order' => 'DESC' // можно не указывать так ао умолчанию
) );
$order = wc_get_order( $customer_order );
$payment_method = $orde['payment_method']; // это крайний метод оплаты
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} \.(jpg|jpeg|png|gif)$ [NC] !-f
RewriteRule .* - [R=404]
</IfModule>
<?php
$context = array();
$context['page'] = Timber::get_post();
$args = array(
'post_type' => 'tours_cat',
'numberposts' => POSTS_PER_PAGE,
'meta_query' => array(
'relation' => 'OR',
array(
'key' => 'tour_type',
'value' => '40',
),
array(
'key' => 'tour_type',
'value' => '30',
),
),
);
$context['posts'] = Timber::get_posts( $args );
Timber::render( 'tours/tours.twig', $context );
?>