Copy function child_enqueue_styles()
{
wp_enqueue_style('astra-child-theme-css', get_stylesheet_directory_uri() . '/style.css', array('astra-theme-css'), CHILD_THEME_ASTRA_CHILD_VERSION, 'all');
wp_enqueue_style('dev-custom-style', get_stylesheet_directory_uri() . '/assets/css/dev-custom.css', array(), '0.1.0', 'all');
wp_enqueue_script('bootstrapjs', get_stylesheet_directory_uri() . '/assets/js/bootstrap.min.js', array('jquery-core'), '1.0.1', 'true');
wp_enqueue_script('dev-custom-script', get_stylesheet_directory_uri() . '/assets/js/dev-custom.js', array('jquery-core'), '1.0.1', 'true');
wp_localize_script(
'dev-custom-script',
'frontend_ajax_object',
array(
'ajaxurl' => admin_url('admin-ajax.php'),
'ajaxnonce' => wp_create_nonce('ajaxnonce'),
)
);
}
add_action('wp_enqueue_scripts', 'child_enqueue_styles', 15);
/**
* !Our Talent
*/
add_shortcode('ourtalent', 'wpb_demo_shortcode_teen');
function wpb_demo_shortcode_teen()
{
ob_start();
// $repeats = get_field('repeat');
$repeats = array (
0 =>
array (
'image' => 'https://psuedukr.mycafe24.com/wp-content/uploads/2024/03/teachear-1.png',
'position' => '선생님',
'description' => '학교/전공 : NYU / Psychology / BA 강의과목 : SAT, Essay, English',
'name' => 'Julie Jeong',
),
1 =>
array (
'image' => 'https://psuedukr.mycafe24.com/wp-content/uploads/2024/03/teachear-2.png',
'position' => '선생님',
'description' => '학교/전공 : BU / Communication / MA 강의과목 : SAT, Essay, English',
'name' => '하승희 (Liz)',
),
2 =>
array (
'image' => 'https://psuedukr.mycafe24.com/wp-content/uploads/2024/03/teachear-3.png',
'position' => '선생님',
'description' => '학교/전공 : BC / Mathmatics / Statistics / MA 강의과목 : SAT, Mathmatics ',
'name' => '임주영',
),
3 =>
array (
'image' => 'https://psuedukr.mycafe24.com/wp-content/uploads/2024/03/teachear-4.png',
'position' => '선생님',
'description' => '학교/전공 : NYU / Dramatic / Literature / BA 강의과목 : SAT, Essay, English',
'name' => '데이빗 오',
),
4 =>
array (
'image' => 'https://psuedukr.mycafe24.com/wp-content/uploads/2024/03/teachear-5.png',
'position' => '선생님',
'description' => '학교/전공 : UBC / Mathmatics / BS 강의과목 : SAT, Mathmatics',
'name' => '조정민',
),
5 =>
array (
'image' => 'https://psuedukr.mycafe24.com/wp-content/uploads/2024/03/teachear-6.png',
'position' => '선생님',
'description' => '학교/전공 : 연세대학교 / 생명공학 / MS 강의과목 : SAT, Mathmatics, Statistics',
'name' => '조하나',
),
6 =>
array (
'image' => 'https://psuedukr.mycafe24.com/wp-content/uploads/2024/03/teachear-7.png',
'position' => '선생님',
'description' => '학교/전공 : UBC/ Civil Engineering / BS 강의과목 : Physics, Chemistry, Math',
'name' => '이청하',
),
7 =>
array (
'image' => 'https://psuedukr.mycafe24.com/wp-content/uploads/2024/03/teachear-9.png',
'position' => '선생님',
'description' => '학교/전공 : 연세대학교 / 생화학 / MS 강의과목 : Chemistry, Biology, Organic Chem',
'name' => '이지현',
),
8 =>
array (
'image' => 'https://psuedukr.mycafe24.com/wp-content/uploads/2024/03/teachear-4.png',
'position' => '선생님',
'description' => '학교/전공 : 카이스트 / MS 강의과목 : Physics, Chemistry, Mathmatics',
'name' => '홍성혁',
),
9 =>
array (
'image' => 'https://psuedukr.mycafe24.com/wp-content/uploads/2024/03/teachear-10.png',
'position' => '선생님',
'description' => '학교/전공 : 한국외국어대 / 통번역 / MA 강의과목 : SAT, TOEFL',
'name' => '변세영',
),
10 =>
array (
'image' => 'https://psuedukr.mycafe24.com/wp-content/uploads/2024/03/teachear-4.png',
'position' => '선생님',
'description' => '학교/전공 : 연세대학교 / 경제학과 / BA 강의과목 : Economics, Business',
'name' => '김영진',
),
11 =>
array (
'image' => 'https://psuedukr.mycafe24.com/wp-content/uploads/2024/03/teachear-4.png',
'position' => '선생님',
'description' => '학교/전공 : Ruguts U / Business / BA 강의과목 : Economics, Business ',
'name' => '김성재',
),
12 =>
array (
'image' => 'https://psuedukr.mycafe24.com/wp-content/uploads/2024/03/teachear-4.png',
'position' => '선생님',
'description' => '학교/전공 : UC Berkeley / Computer E / BS 강의과목 : Mathmatics, Computer S',
'name' => '장재원',
),
13 =>
array (
'image' => 'https://psuedukr.mycafe24.com/wp-content/uploads/2024/03/teachear-14.png',
'position' => '선생님',
'description' => '학교/전공 : 한국외대 / 역사학 박사 강의과목 : US History, World History',
'name' => '심재선',
),
14 =>
array (
'image' => 'https://psuedukr.mycafe24.com/wp-content/uploads/2024/03/teachear-4.png',
'position' => '선생님',
'description' => '학교/전공 : LES (런던정경대) / Political Science / MA 강의과목 : TOEFL, Politics, History',
'name' => '김지만',
),
15 =>
array (
'image' => 'https://psuedukr.mycafe24.com/wp-content/uploads/2024/03/teachear-5.png',
'position' => '선생님',
'description' => '학교/전공 : U of Sheffield / Economics / BS 강의과목 : IB, Business ',
'name' => '박세인',
),
16 =>
array (
'image' => 'https://psuedukr.mycafe24.com/wp-content/uploads/2024/03/teachear-17.png',
'position' => '선생님',
'description' => '학교/전공 : 한국외대 / 통변역대학원 / 석사 강의과목 : Korean / Spanish / French',
'name' => '임주희',
),
17 =>
array (
'image' => 'https://psuedukr.mycafe24.com/wp-content/uploads/2024/03/teachear-5.png',
'position' => '선생님',
'description' => '학교/전공 : U of Wisconsin / Doctor of Dentistry 강의과목 : Biology, Mathmatics',
'name' => '이미지',
),
18 =>
array (
'image' => 'https://psuedukr.mycafe24.com/wp-content/uploads/2024/03/teachear-5.png',
'position' => '선생님',
'description' => '학교/전공 : Medical Doctor / in Europe 강의과목 : Biology, Chemistry, Organic Chem',
'name' => '김예진',
),
19 =>
array (
'image' => 'https://psuedukr.mycafe24.com/wp-content/uploads/2024/03/teachear-5.png',
'position' => '선생님',
'description' => '학교/전공 : 홍콩과기대 / 경영학 / BS 강의과목 : IB Business',
'name' => '고남원',
),
20 =>
array (
'image' => 'https://psuedukr.mycafe24.com/wp-content/uploads/2024/03/teachear-5.png',
'position' => '선생님',
'description' => '학교/전공 : UBC / Biology / BS 강의과목 : Biology, Mathmatics',
'name' => '고유진',
),
21 =>
array (
'image' => 'https://psuedukr.mycafe24.com/wp-content/uploads/2024/03/teachear-5.png',
'position' => '선생님',
'description' => '학교/전공 : 고려대학교 / 교육학석사 / 전,고대입학사정관 강의과목 : 수시면접, 논술',
'name' => '아이비',
),
22 =>
array (
'image' => 'https://psuedukr.mycafe24.com/wp-content/uploads/2024/03/teachear-4.png',
'position' => '선생님',
'description' => '학교/전공 : 연세대 / 법학부 / 석사 강의과목 : 수시면접, 논술',
'name' => '김형수',
),
);
$keys = array_keys($repeats);
shuffle($keys);
$shuffledArray = array();
foreach ($keys as $key) {
$shuffledArray[$key] = $repeats[$key];
}
$count = count($shuffledArray);
?>
<div class="container ourtalent">
<div class="row ourtalent__row">
<div class="ourtalent__col col-sm-3">
<div class="fadein">
<?php
$i = 1;
foreach ($shuffledArray as $key => $shuffledA) :
echo '<div class="ourtalent__img" data-id="' . $key . '"><img src="' . $shuffledA["image"] . '" alt="Amit Sachdeva" /><span class="name">' . $shuffledA["name"] . '</span></div>';
if ($i % 3 == 0 && $count != $i) {
echo '</div></div><div class="ourtalent__col col-sm-3"><div class="fadein">';
}
$i++;
endforeach;
?>
</div>
</div>
</div>
<?php
$data = ob_get_contents();
ob_end_clean();
return $data;
}
add_action('wp_ajax_func_knowledge_popup', 'func_knowledge_popup');
add_action("wp_ajax_nopriv_func_knowledge_popup", "func_knowledge_popup");
function func_knowledge_popup()
{
if ($_POST['id']) {
$repeats = get_field('repeat', 1648);
$id = $_POST['id'];
$result = $repeats[$id];
echo wp_json_encode([
'status' => 'success',
'result' => $result,
'getResponid' => $id
]);
}
wp_die();
}
/**
* Our Talent!
*/