Good evening,
I had some modifications in functions.php file to complete on my current wordpress website development.
I have completed new code within the file and uploaded my edited function file to child theme. The code simply replaces the metadata word "new" with "new with tags" on an ad in a classified ad website.
After doing so, the changes i have made are not taking placement of parent functions.php file.
Is there something specifically i must do in my child functions file to overwrite the parent?
Please see following code. (Child theme -> functions.php)
<?php
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles', 12 );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}
function adifier_custom_meta() {
$meta_boxes = array();
$advert_details = array(
array(
'id' => 'advert_cond',
'name' => esc_html__( 'Condition', 'adifier' ),
'type' => 'select',
'options' => array(
'0' => esc_html__( '-Select-', 'adifier' ),
'1' => esc_html__( 'New with tags', 'adifier' ),
'2' => esc_html__( 'New with tags', 'adifier' ),
'3' => esc_html__( 'Used with tags', 'adifier' ),
'4' => esc_html__( 'For Parts Or Not Working', 'adifier' ),
),
'values_callback' => 'adifier_get_advert_meta',
'save_callback' => 'adifier_save_advert_meta',
),
);
?>
functions.php, notfunction.php(plural, not singular).functions.phpfile loads before the parent.