/*
Theme Name: Lightning
Text Domain: lightning
Theme URI: https://lightning.vektor-inc.co.jp/en/
Description: Lightning is a very simple & easy to customize theme which is based on the Bootstrap. It is also very friendly with custom post types and custom taxonomies. When you add a new one, the breadcrumbs will be adjusted and posts will look beautifully without editing or adding a template files.
Author: Vektor,Inc.
Author URI: https://www.vektor-inc.co.jp
Version: 15.29.4
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
Tags: blog, one-column, custom-background, custom-colors, custom-logo, custom-menu, editor-style, featured-images, footer-widgets, full-width-template, sticky-post, theme-options, threaded-comments, translation-ready, block-styles, wide-blocks
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Lightning WordPress theme, Copyright (C) 2015-2024 Vektor,Inc.
Lightning WordPress theme is licensed under the GPL.

Lightning WordPress Theme bundles the following third-party resources:

Font Awesome icon font, Copyright 2012 Fonticons, Inc.
its fonts are licensed under the terms of the SIL OFL License 1.1, and its code is licensed under the terms of the MIT license
Source: https://fontawesome.com/

Bootstrap framework, Copyright 2011 Bootstrap Authors and Twitter, Inc.
Bootstrap is licensed under the terms of the MIT license
Source: https://getbootstrap.com/

CSS Simple Tree Shaking
CSS Simple Tree Shaking is licensed under the terms of the GNU General Public License v2 license
Source: https://celtislab.net/
*/
php

折りたたむ

たたむ

著作権
// カスタムフィールドを求人情報に追加
add_filter('submit_job_form_fields', 'custom_submit_job_form_fields');
function custom_submit_job_form_fields($fields) {
    $fields['job']['job_location'] = array(
        'label' => __('勤務地', 'wp-job-manager'),
        'type' => 'text',
        'required' => true,
        'placeholder' => '例: 千葉県市川市国分',
        'priority' => 1
    );
    $fields['job']['job_salary'] = array(
        'label' => __('時給', 'wp-job-manager'),
        'type' => 'text',
        'required' => true,
        'placeholder' => '例: 1,200円',
        'priority' => 2
    );
    $fields['job']['job_type_cleaning'] = array(
        'label' => __('清掃種類', 'wp-job-manager'),
        'type' => 'select',
        'required' => true,
        'options' => array(
            'office' => 'オフィス清掃',
            'house' => '家庭清掃',
            'special' => '特殊清掃'
        ),
        'priority' => 3
    );
    return $fields;
}

// 求人詳細ページにカスタムフィールドを表示
add_action('single_job_listing_meta_end', 'display_custom_job_fields');
function display_custom_job_fields() {
    global $post;
    $location = get_post_meta($post->ID, '_job_location', true);
    $salary = get_post_meta($post->ID, '_job_salary', true);
    $type_cleaning = get_post_meta($post->ID, '_job_type_cleaning', true);
    if ($location) {
        echo '<li>' . __('勤務地', 'wp-job-manager') . ': ' . esc_html($location) . '</li>';
    }
    if ($salary) {
        echo '<li>' . __('時給', 'wp-job-manager') . ': ' . esc_html($salary) . '</li>';
    }
    if ($type_cleaning) {
        echo '<li>' . __('清掃種類', 'wp-job-manager') . ': ' . esc_html($type_cleaning) . '</li>';
    }
}