admin_url('admin-ajax.php'), 'nonce' => wp_create_nonce('application_guy_nonce') )); } add_action('wp_enqueue_scripts', 'application_guy_scripts'); function application_guy_setup() { // Enable title tag support add_theme_support('title-tag'); // Enable post thumbnails add_theme_support('post-thumbnails'); // Enable custom logo support add_theme_support('custom-logo', array( 'height' => 100, 'width' => 400, 'flex-height' => true, 'flex-width' => true, 'header-text' => array('site-title', 'site-description'), )); // Register navigation menus register_nav_menus(array( 'primary' => __('Primary Menu', 'application-guy-professional'), )); // Add theme support for mandatory WP features add_theme_support('automatic-feed-links'); add_theme_support('wp-block-styles'); add_theme_support('responsive-embeds'); add_theme_support('align-wide'); add_theme_support('html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', 'script', 'style', )); // Custom background & header (recommended) add_theme_support('custom-background'); add_theme_support('custom-header'); // Comment reply script if (is_singular() && comments_open() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } // Add editor styles add_editor_style('assets/css/editor-style.css'); // Auto-install Menu if missing (One-Click Vibe) $menu_name = 'Main Menu'; $menu_exists = wp_get_nav_menu_object($menu_name); // If menu doesn't exist, create it if (!$menu_exists) { $menu_id = wp_create_nav_menu($menu_name); // Add Home Page wp_update_nav_menu_item($menu_id, 0, array( 'menu-item-title' => __('Home', 'application-guy-professional'), 'menu-item-classes' => 'home', 'menu-item-url' => home_url('/'), 'menu-item-status' => 'publish' )); // Add Client Portal (Critical for this user) wp_update_nav_menu_item($menu_id, 0, array( 'menu-item-title' => __('Student Portal', 'application-guy-professional'), 'menu-item-url' => home_url('/client-portal/'), 'menu-item-status' => 'publish' )); // Add Contact Anchor wp_update_nav_menu_item($menu_id, 0, array( 'menu-item-title' => __('Contact', 'application-guy-professional'), 'menu-item-url' => '#contact', 'menu-item-status' => 'publish' )); // Assign to Primary Location $locations = get_theme_mod('nav_menu_locations'); $locations['primary'] = $menu_id; set_theme_mod('nav_menu_locations', $locations); } // If menu exists but not assigned, assign it elseif (!has_nav_menu('primary') && $menu_exists) { $locations = get_theme_mod('nav_menu_locations'); $locations['primary'] = $menu_exists->term_id; set_theme_mod('nav_menu_locations', $locations); } } add_action('after_setup_theme', 'application_guy_setup'); function application_guy_widgets_init() { register_sidebar(array( 'name' => __('Left Sidebar', 'application-guy-professional'), 'id' => 'sidebar-left', 'description' => __('Add widgets here to appear in the left sidebar of posts and blog pages.', 'application-guy-professional'), 'before_widget' => '', 'before_title' => '
Expert guidance for your study abroad dreams.