It looks like nothing was found at this location.
<?php if ( ! defined( 'ABSPATH' ) ) { exit; } add_action( 'wp_enqueue_scripts', function () { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css', [], wp_get_theme( get_template() )->get( 'Version' ) ); wp_enqueue_style( 'child-style', get_stylesheet_uri(), [ 'parent-style' ], wp_get_theme()->get( 'Version' ) ); } ); /** * Register Locations Custom Post Type. */ function hello_register_locations_cpt() { $labels = [ 'name' => _x( 'Locations', 'Post type general name', 'hello-elementor-child' ), 'singular_name' => _x( 'Location', 'Post type singular name', 'hello-elementor-child' ), 'menu_name' => _x( 'Locations', 'Admin Menu text', 'hello-elementor-child' ), 'name_admin_bar' => _x( 'Location', 'Add New on Toolbar', 'hello-elementor-child' ), 'add_new' => __( 'Add New', 'hello-elementor-child' ), 'add_new_item' => __( 'Add New Location', 'hello-elementor-child' ), 'new_item' => __( 'New Location', 'hello-elementor-child' ), 'edit_item' => __( 'Edit Location', 'hello-elementor-child' ), 'view_item' => __( 'View Location', 'hello-elementor-child' ), 'all_items' => __( 'All Locations', 'hello-elementor-child' ), 'search_items' => __( 'Search Locations', 'hello-elementor-child' ), 'not_found' => __( 'No locations found.', 'hello-elementor-child' ), 'not_found_in_trash' => __( 'No locations found in Trash.', 'hello-elementor-child' ), 'featured_image' => _x( 'Location Image', 'Overrides the “Featured Image” phrase', 'hello-elementor-child' ), 'set_featured_image' => _x( 'Set location image', 'Overrides the “Set featured image” phrase', 'hello-elementor-child' ), 'remove_featured_image' => _x( 'Remove location image', 'Overrides the “Remove featured image” phrase', 'hello-elementor-child' ), 'use_featured_image' => _x( 'Use as location image', 'Overrides the “Use as featured image” phrase', 'hello-elementor-child' ), 'archives' => _x( 'Location archives', 'The post type archive label', 'hello-elementor-child' ), 'insert_into_item' => _x( 'Insert into location', 'Overrides the “Insert into post” phrase', 'hello-elementor-child' ), 'uploaded_to_this_item' => _x( 'Uploaded to this location', 'Overrides the “Uploaded to this post” phrase', 'hello-elementor-child' ), 'items_list' => _x( 'Locations list', 'Screen reader text for the items list table', 'hello-elementor-child' ), 'items_list_navigation' => _x( 'Locations list navigation', 'Screen reader text for the items list navigation', 'hello-elementor-child' ), ]; $args = [ 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'menu_icon' => 'dashicons-location-alt', 'query_var' => true, 'rewrite' => [ 'slug' => 'locations' ], 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'supports' => [ 'title', 'editor', 'excerpt', 'thumbnail', 'revisions', 'custom-fields' ], 'show_in_rest' => true, ]; register_post_type( 'location', $args ); } add_action( 'init', 'hello_register_locations_cpt' ); /** * Register Podcasts Custom Post Type. */ function hello_register_podcasts_cpt() { $labels = [ 'name' => _x( 'Podcasts', 'Post type general name', 'hello-elementor-child' ), 'singular_name' => _x( 'Podcast', 'Post type singular name', 'hello-elementor-child' ), 'menu_name' => _x( 'Podcasts', 'Admin Menu text', 'hello-elementor-child' ), 'name_admin_bar' => _x( 'Podcast', 'Add New on Toolbar', 'hello-elementor-child' ), 'add_new' => __( 'Add New', 'hello-elementor-child' ), 'add_new_item' => __( 'Add New Podcast', 'hello-elementor-child' ), 'new_item' => __( 'New Podcast', 'hello-elementor-child' ), 'edit_item' => __( 'Edit Podcast', 'hello-elementor-child' ), 'view_item' => __( 'View Podcast', 'hello-elementor-child' ), 'all_items' => __( 'All Podcasts', 'hello-elementor-child' ), 'search_items' => __( 'Search Podcasts', 'hello-elementor-child' ), 'not_found' => __( 'No podcasts found.', 'hello-elementor-child' ), 'not_found_in_trash' => __( 'No podcasts found in Trash.', 'hello-elementor-child' ), 'featured_image' => _x( 'Podcast Cover', 'Overrides the “Featured Image” phrase', 'hello-elementor-child' ), 'set_featured_image' => _x( 'Set podcast cover', 'Overrides the “Set featured image” phrase', 'hello-elementor-child' ), 'remove_featured_image' => _x( 'Remove podcast cover', 'Overrides the “Remove featured image” phrase', 'hello-elementor-child' ), 'use_featured_image' => _x( 'Use as podcast cover', 'Overrides the “Use as featured image” phrase', 'hello-elementor-child' ), 'archives' => _x( 'Podcast archives', 'The post type archive label', 'hello-elementor-child' ), 'insert_into_item' => _x( 'Insert into podcast', 'Overrides the “Insert into post” phrase', 'hello-elementor-child' ), 'uploaded_to_this_item' => _x( 'Uploaded to this podcast', 'Overrides the “Uploaded to this post” phrase', 'hello-elementor-child' ), 'items_list' => _x( 'Podcasts list', 'Screen reader text for the items list table', 'hello-elementor-child' ), 'items_list_navigation' => _x( 'Podcasts list navigation', 'Screen reader text for the items list navigation', 'hello-elementor-child' ), ]; $args = [ 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 6, 'menu_icon' => 'dashicons-microphone', 'query_var' => true, 'rewrite' => [ 'slug' => 'podcasts' ], 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'supports' => [ 'title', 'editor', 'excerpt', 'thumbnail', 'revisions', 'comments', 'custom-fields' ], 'show_in_rest' => true, ]; register_post_type( 'podcast', $args ); } add_action( 'init', 'hello_register_podcasts_cpt' ); /** * Add YouTube Link meta box for Podcasts. */ function hello_add_podcast_youtube_metabox() { add_meta_box( 'hello_podcast_youtube_link', __( 'YouTube Link', 'hello-elementor-child' ), 'hello_render_podcast_youtube_metabox', 'podcast', 'side', 'default' ); } add_action( 'add_meta_boxes', 'hello_add_podcast_youtube_metabox' ); /** * Render YouTube Link meta box for Podcasts. */ function hello_render_podcast_youtube_metabox( $post ) { $youtube_link = get_post_meta( $post->ID, 'podcast_youtube_link', true ); wp_nonce_field( 'hello_podcast_youtube_meta', 'hello_podcast_youtube_meta_nonce' ); ?> <p> <label for="podcast_youtube_link" style="display:block; margin-bottom:6px; font-weight:600;"> <?php esc_html_e( 'YouTube URL', 'hello-elementor-child' ); ?> </label> <input type="url" id="podcast_youtube_link" name="podcast_youtube_link" value="<?php echo esc_attr( $youtube_link ); ?>" placeholder="https://youtube.com/watch?v=..." style="width:100%;" /> </p> <?php } /** * Save Podcast YouTube Link meta field. */ function hello_save_podcast_youtube_meta( $post_id ) { if ( ! isset( $_POST['hello_podcast_youtube_meta_nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['hello_podcast_youtube_meta_nonce'] ) ), 'hello_podcast_youtube_meta' ) ) { return; } if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { return; } if ( ! current_user_can( 'edit_post', $post_id ) ) { return; } if ( isset( $_POST['podcast_youtube_link'] ) ) { update_post_meta( $post_id, 'podcast_youtube_link', esc_url_raw( wp_unslash( $_POST['podcast_youtube_link'] ) ) ); } } add_action( 'save_post_podcast', 'hello_save_podcast_youtube_meta' ); /** * Display custom location fields below the main editor. */ function hello_location_fields_after_editor( $post ) { if ( 'location' !== $post->post_type ) { return; } $book_link = get_post_meta( $post->ID, 'location_book_link', true ); $brochure_link = get_post_meta( $post->ID, 'location_brochure_link', true ); wp_nonce_field( 'hello_location_meta', 'hello_location_meta_nonce' ); ?> <div class="hello-location-fields" style="margin-bottom: 25px; padding: 18px; background: #fff; border: 1px solid #d5d8df; border-radius: 8px; box-shadow: 0 1px 6px rgba(15, 23, 42, 0.1);"> <h2 style="margin-top: 0; margin-bottom: 8px; font-size: 16px;">Location Actions</h2> <p style="margin-bottom: 12px;"> <label for="location_book_link" style="display: block; font-weight: 600; margin-bottom: 4px;">Book a Visit URL</label> <input type="url" id="location_book_link" name="location_book_link" value="<?php echo esc_attr( $book_link ); ?>" style="width:100%; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 4px;" placeholder="https://example.com/book" /> </p> <p style="margin-bottom: 0;"> <label for="location_brochure_link" style="display: block; font-weight: 600; margin-bottom: 4px;">Brochure URL</label> <input type="url" id="location_brochure_link" name="location_brochure_link" value="<?php echo esc_attr( $brochure_link ); ?>" style="width:100%; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 4px;" placeholder="https://example.com/brochure" /> </p> </div> <?php } add_action( 'edit_form_after_editor', 'hello_location_fields_after_editor' ); /** * Save meta fields. */ function hello_save_location_meta( $post_id ) { if ( ! isset( $_POST['hello_location_meta_nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['hello_location_meta_nonce'] ) ), 'hello_location_meta' ) ) { return; } if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { return; } if ( isset( $_POST['post_type'] ) && 'location' === $_POST['post_type'] ) { if ( ! current_user_can( 'edit_post', $post_id ) ) { return; } } if ( isset( $_POST['location_book_link'] ) ) { update_post_meta( $post_id, 'location_book_link', esc_url_raw( wp_unslash( $_POST['location_book_link'] ) ) ); } if ( isset( $_POST['location_brochure_link'] ) ) { update_post_meta( $post_id, 'location_brochure_link', esc_url_raw( wp_unslash( $_POST['location_brochure_link'] ) ) ); } } add_action( 'save_post_location', 'hello_save_location_meta' ); /** * Register "Events" Custom Post Type through ACF (acf_register_post_type). * Requires the ACF plugin (already active on this site). */ if ( function_exists( 'acf_register_post_type' ) ) { acf_register_post_type( 'event', [ 'labels' => [ 'name' => 'Events', 'singular_name' => 'Event', ], 'label' => 'Events', 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 7, 'menu_icon' => 'dashicons-calendar-alt', 'capability_type' => 'post', 'hierarchical' => false, 'supports' => [ 'title', 'editor', 'excerpt', 'thumbnail', 'revisions', 'custom-fields' ], 'has_archive' => true, 'rewrite' => [ 'slug' => 'events' ], 'query_var' => true, 'show_in_rest' => true, 'delete_with_user' => false, ] ); }
It looks like nothing was found at this location.