I'm trying to modify a Wordpress child theme's function.php file by introducing a new function. However, system keeps showing an error after I add the function. This is the original code without the added function yet (which works perfectly fine):
<?php
/*
* Custom functions that overwrites original Travelify functionality
*/
add_action( 'wp_enqueue_scripts', 'travelify_enqueue_styles' );
function travelify_enqueue_styles() {
wp_enqueue_style( 'travelify-parent-style', get_template_directory_uri() . '/style.css' );
}
?>
And this is after adding the new function --- which results in an error:
<?php
/*
* Custom functions that overwrites original Travelify functionality
*/
add_action( 'wp_enqueue_scripts', 'travelify_enqueue_styles' );
function travelify_enqueue_styles() {
wp_enqueue_style( 'travelify-parent-style', get_template_directory_uri() . '/style.css' );
}
if ( ! function_exists( 'travelify_setup' ) ):
function travelify_setup() {
/** Load Structure */
require( get_template_directory() . '/library/structure/header-extensions.php' );
require( get_template_directory() . '/library/structure/sidebar-extensions.php' );
require( get_template_directory() . '/library/structure/footer-extensions.php' );
require( get_template_directory() . '/library/structure/content-extensions.php' );
/**
}
endif; // travelify_setup
?>
System keeps pointing to ?>
as an unexpected end of file. I'm not an expert in coding so I'm not sure why such an error keeps showing up.
Thanks in advance for any feedback.