File: /home/eblama1/gentechlib.com/wp-content/themes/gentech-native-theme/functions.php
<?php
if (!defined('ABSPATH')) { exit; }
function gentech_native_setup() {
add_theme_support('title-tag');
add_theme_support('post-thumbnails');
add_theme_support('custom-logo', array('height'=>80,'width'=>260,'flex-height'=>true,'flex-width'=>true));
add_theme_support('elementor');
register_nav_menus(array('primary' => __('Primary Menu', 'gentech-native')));
}
add_action('after_setup_theme', 'gentech_native_setup');
function gentech_native_enqueue_assets() {
wp_enqueue_style('gentech-native-style', get_stylesheet_uri(), array(), '3.2.0');
wp_enqueue_script('gentech-native-script', get_template_directory_uri() . '/assets/js/gentech-native.js', array(), '3.2.0', true);
}
add_action('wp_enqueue_scripts', 'gentech_native_enqueue_assets');
function gentech_native_render_elementor_template($option_name) {
$template_id = absint(get_option($option_name));
if ($template_id && class_exists('\\Elementor\\Plugin')) {
echo \Elementor\Plugin::$instance->frontend->get_builder_content_for_display($template_id, true);
return true;
}
return false;
}
function gentech_native_body_classes($classes) {
$classes[] = 'gentech-native-site';
$classes[] = 'gentech-full-width-layout';
return $classes;
}
add_filter('body_class', 'gentech_native_body_classes');