__('Menú Principal', 'isabella'), 'footer' => __('Menú Footer', 'isabella'), )); // Soporte para HTML5 add_theme_support('html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', 'style', 'script', )); // Soporte para WooCommerce (opcional) add_theme_support('woocommerce'); // Soporte para Gutenberg add_theme_support('editor-styles'); add_editor_style('assets/css/editor-style.css'); } add_action('after_setup_theme', 'isabella_setup'); /** * Enqueue scripts y estilos */ function isabella_scripts() { // Google Fonts wp_enqueue_style( 'isabella-fonts', 'https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Lato:wght@300;400;700&display=swap', array(), null ); // Tailwind CSS wp_enqueue_script( 'tailwindcss', 'https://cdn.tailwindcss.com', array(), null, false ); // Lucide Icons wp_enqueue_script( 'lucide-icons', 'https://unpkg.com/lucide@latest', array(), null, true ); // Estilos personalizados wp_enqueue_style( 'isabella-style', get_stylesheet_uri(), array(), '1.0.0' ); wp_enqueue_style( 'isabella-custom', get_template_directory_uri() . '/assets/css/custom.css', array(), '1.0.0' ); // Scripts personalizados wp_enqueue_script( 'isabella-main', get_template_directory_uri() . '/assets/js/main.js', array('lucide-icons'), '1.0.0', true ); // Configuración AJAX wp_localize_script('isabella-main', 'isabella_ajax', array( 'ajax_url' => admin_url('admin-ajax.php'), 'nonce' => wp_create_nonce('isabella_nonce') )); } add_action('wp_enqueue_scripts', 'isabella_scripts'); /** * Configuración de Tailwind */ function isabella_tailwind_config() { ?> __('Portafolio', 'isabella'), 'singular_name' => __('Proyecto', 'isabella'), 'add_new' => __('Añadir Nuevo', 'isabella'), 'add_new_item' => __('Añadir Nuevo Proyecto', 'isabella'), 'edit_item' => __('Editar Proyecto', 'isabella'), 'new_item' => __('Nuevo Proyecto', 'isabella'), 'view_item' => __('Ver Proyecto', 'isabella'), 'search_items' => __('Buscar Proyectos', 'isabella'), 'not_found' => __('No se encontraron proyectos', 'isabella'), ); $args = array( 'labels' => $labels, 'public' => true, 'has_archive' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'menu_icon' => 'dashicons-format-gallery', 'supports' => array('title', 'editor', 'thumbnail', 'excerpt', 'custom-fields'), 'taxonomies' => array('portfolio_category'), 'rewrite' => array('slug' => 'portafolio'), ); register_post_type('portfolio', $args); } add_action('init', 'isabella_portfolio_post_type'); /** * Taxonomía: Categorías de Portafolio */ function isabella_portfolio_taxonomy() { $labels = array( 'name' => __('Categorías', 'isabella'), 'singular_name' => __('Categoría', 'isabella'), ); $args = array( 'labels' => $labels, 'hierarchical' => true, 'public' => true, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true, 'rewrite' => array('slug' => 'categoria-portafolio'), ); register_taxonomy('portfolio_category', array('portfolio'), $args); } add_action('init', 'isabella_portfolio_taxonomy'); /** * Custom Post Type: Testimonios */ function isabella_testimonials_post_type() { $labels = array( 'name' => __('Testimonios', 'isabella'), 'singular_name' => __('Testimonio', 'isabella'), ); $args = array( 'labels' => $labels, 'public' => false, 'publicly_queryable' => false, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 6, 'menu_icon' => 'dashicons-format-quote', 'supports' => array('title', 'editor', 'thumbnail'), ); register_post_type('testimonial', $args); } add_action('init', 'isabella_testimonials_post_type'); /** * Custom Post Type: Servicios */ function isabella_services_post_type() { $labels = array( 'name' => __('Servicios', 'isabella'), 'singular_name' => __('Servicio', 'isabella'), ); $args = array( 'labels' => $labels, 'public' => false, 'publicly_queryable' => false, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 7, 'menu_icon' => 'dashicons-star-filled', 'supports' => array('title', 'editor', 'thumbnail'), ); register_post_type('service', $args); } add_action('init', 'isabella_services_post_type'); /** * Opciones del Tema (ACF o Customizer) */ function isabella_customize_register($wp_customize) { // Sección de Información General $wp_customize->add_section('isabella_general', array( 'title' => __('Información General', 'isabella'), 'priority' => 30, )); // Email de contacto $wp_customize->add_setting('isabella_email', array( 'default' => 'booking@isabellamoreno.com', 'sanitize_callback' => 'sanitize_email', )); $wp_customize->add_control('isabella_email', array( 'label' => __('Email de Contacto', 'isabella'), 'section' => 'isabella_general', 'type' => 'email', )); // Teléfono $wp_customize->add_setting('isabella_phone', array( 'default' => '+1 (305) 555-0123', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('isabella_phone', array( 'label' => __('Teléfono', 'isabella'), 'section' => 'isabella_general', 'type' => 'text', )); // Ubicación $wp_customize->add_setting('isabella_location', array( 'default' => 'Miami, FL', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('isabella_location', array( 'label' => __('Ubicación', 'isabella'), 'section' => 'isabella_general', 'type' => 'text', )); // Redes Sociales $wp_customize->add_section('isabella_social', array( 'title' => __('Redes Sociales', 'isabella'), 'priority' => 35, )); $socials = array('instagram', 'twitter', 'facebook', 'linkedin'); foreach ($socials as $social) { $wp_customize->add_setting("isabella_{$social}", array( 'sanitize_callback' => 'esc_url_raw', )); $wp_customize->add_control("isabella_{$social}", array( 'label' => ucfirst($social), 'section' => 'isabella_social', 'type' => 'url', )); } } add_action('customize_register', 'isabella_customize_register'); /** * Widgets */ function isabella_widgets_init() { register_sidebar(array( 'name' => __('Sidebar Footer', 'isabella'), 'id' => 'footer-1', 'description' => __('Widgets para el footer', 'isabella'), 'before_widget' => '
', 'before_title' => '