Wp:theme:smntcs-retro
Здесь будет описано создание дочерней темы SMNTCS Retro
Создание дочерней темы:
Создаем папку под дочернюю тему в папке "theme" с названием:
smntcs-retro-child
Затем в созданной папке создаем файл: style.css
И уже в него вставляем следующий код:
/*
Theme Name: SMNTCS Retro Сhild
Theme URI: https://8j0rn.dagbok.ru/edit/Wp:smntcs-retro
Author: 8j0rn
Author URI: https://8j0rn.dagbok.ru
Description: 8j0rn Child Theme SMNTCS Retro is a minimalistic theme for the average nerd.
Version: 1.1
Tested up to: 6.2
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: SMNTCS Retro
Template: smntcs-retro
Tags: blog, one-column, custom-menu, featured-images, footer-widgets, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready
*/
Всё, дочерняя тема создана, теперь следует добавлять изменения в тему чтобы ее адаптировать под свои нужды.
Функция вывода "копирайта" находится в файле: template-tags.php, который находится в папке inc
Функция называется: smntcs_retro_site_footer()
/**
* Displays the site footer.
*
* @since 1.0.0
*/
function smntcs_retro_site_footer() {
$data[] = gmdate( 'Y' );
$data[] = get_bloginfo();
$data[] = esc_html__( '© 8j0rn', 'smntcs-retro' );
$data[] = sprintf(
'<a href="%s">%s</a>',
esc_url( __( 'https://8j0rn.dagbok.ru', 'smntcs-retro' ) ),
esc_html__( 'Powered by WordPress', 'smntcs-retro' )
);
$wrapper = '<div id="site-footer">© %s %s. %s. %s.</div><!-- #site-footer -->';
$html = sprintf( $wrapper, $data[0], $data[1], $data[2], $data[3] );
$html = apply_filters( 'smntcs_retro_site_footer', $html, $data, $wrapper );
echo $html; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}