RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^((?!www\.)[^.]+)\.my-site\.ru$
RewriteRule ^ https://%1.my-site.ru%{REQUEST_URI} [NE,L,R]
ga(function(tracker) { var clientId = tracker.get('clientId'); });
$current_term = get_queried_object();
echo $current_term->parent; // ID родительской категории
get_queried_object();
https://wp-kama.ru/function/get_queried_object public function render_pug_in_twig( $filename ) {
$path = get_template_directory() . '/pug/'. $filename .'.pug';
return PugToTwig::convert(file_get_contents($path, true));
}
$twig->addFunction( new Twig_SimpleFunction( 'render_pug_in_twig', array($this, 'render_pug_in_twig') ) );
{{ render_pug_in_twig('my_file') }}
. Но на выходе строки
Но вот как выбрать после текст, ума не приложу. Но спасибо за пример.