// Добавление пользовательского JS на все страницы
function my_custom_js() {
wp_enqueue_script(
‘my-custom-script’,
get_template_directory_uri() . ‘/js/soglasie.js’,
array(),
‘1.0’,
true
);
}
add_action(‘wp_enqueue_scripts’, ‘my_custom_js’);
// Отключение механизма content_portfolio_id для одиночных записей
function fix_portfolio_single_display($template) {
if (is_singular(«us_portfolio»)) {
// Используем стандартный шаблон single.php
$single_template = locate_template(«single.php»);
if ($single_template) {
return $single_template;
}
}
return $template;
}
add_filter(«template_include», «fix_portfolio_single_display», 99);