Chèn đoạn code sau vào file functions.php
require_once get_template_directory() . '/customizer-anbiwebfooter.php'; require_once get_template_directory() . '/customizer-anbiwebhead.php';
Tiếp theo hãy tạo 2 file customizer-anbiwebfooter.php và customizer-anbiwebhead.php ngang hàng với file functions.php trong theme (hoặc có thể đặt 2 file trên vào 1 folder nào đó, tùy ý bạn muốn)
Chèn đoạn code sau vào customizer-anbiwebhead.php
<?php function carrental_customize_register( $wp_customize ) { $wp_customize->add_setting( 'carrental_logo' ); // Thêm cài đặt cho trình tải lên logo // Thêm kiểm soát cho trình tải lên logo (trình tải lên thực tế) $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'carrental_logo', array( 'label' => __( 'Tải logo', 'carrental_logo' ), 'section' => 'title_tagline', 'settings' => 'carrental_logo', ) ) ); } add_action( 'customize_register', 'carrental_customize_register' ); function head_customize_register($wp_customize) { $wp_customize->add_section("head1", array( 'title' => __("Thay đổi logo, hotline"), 'priority' => 130, )); //Code upload ảnh $wp_customize->add_setting("footer_logo", array( 'transport' => 'postMessage', )); $wp_customize->add_control(new WP_Customize_Upload_Control($wp_customize,'footer_logo',array( 'label' => __('Upload ảnh', 'devvn'), 'section' => 'head1', 'settings' => 'footer_logo', ))); //Code chèn text $wp_customize->add_setting("head_text", array( 'default' => '', 'transport' => 'postMessage', )); $wp_customize->add_control(new WP_Customize_Control($wp_customize,"head_text",array( 'label' => __("Thay đổi hotline"), 'section' => 'head1', 'settings' => 'head_text', 'type' => 'textarea', ))); } add_action("customize_register","head_customize_register");
Chèn đoạn code sau vào customizer-anbiwebfooter.php
<?php function footer_customize_register($wp_customize) { $wp_customize->add_section("footer1", array( 'title' => __("Tùy biến Zubi Cloud Footer"), 'priority' => 130, )); //Footer text $wp_customize->add_setting("footer_text", array( 'default' => '', 'transport' => 'postMessage', )); $wp_customize->add_control(new WP_Customize_Control($wp_customize,"footer_text",array( 'label' => __("Bản đồ"), 'section' => 'footer1', 'settings' => 'footer_text', 'type' => 'textarea', ))); //Footer text $wp_customize->add_setting("footer_text1", array( 'default' => '', 'transport' => 'postMessage', )); $wp_customize->add_control(new WP_Customize_Control($wp_customize,"footer_text1",array( 'label' => __("Like facebook"), 'section' => 'footer1', 'settings' => 'footer_text1', 'type' => 'textarea', ))); //Footer text $wp_customize->add_setting("footer_text2", array( 'default' => '', 'transport' => 'postMessage', )); $wp_customize->add_control(new WP_Customize_Control($wp_customize,"footer_text2",array( 'label' => __("Thông tin công ty"), 'section' => 'footer1', 'settings' => 'footer_text2', 'type' => 'textarea', ))); //Footer text $wp_customize->add_setting("footer_text3", array( 'default' => '', 'transport' => 'postMessage', )); $wp_customize->add_control(new WP_Customize_Control($wp_customize,"footer_text3",array( 'label' => __("Thanh Hotline"), 'section' => 'footer1', 'settings' => 'footer_text3', 'type' => 'textarea', ))); } add_action("customize_register","footer_customize_register");
Cách gọi cách hàm trên, chèn đoạn code sau vào nơi cần hiển thị trong themes:
<?php echo get_theme_mod( 'head_text' ); ?>
hay
<?php echo get_theme_mod( 'footer_logo' ); ?>
[url=http://tadalafilstd.com/]tadalafil india brand[/url]
[url=https://olisinopril.com/]prinivil 10 mg tab[/url]
[url=https://bmtadalafil.online/]tadalafil tablets[/url]
[url=http://synthroidsl.online/]synthroid brand name price[/url]
[url=https://synthroidsl.online/]synthroid 300 mcg canada[/url]
Aw, this was an extremely good post. Taking the time and actual effort to produce a really good
article… but what can I say… I put things off a lot
and never seem to get nearly anything done.
[url=https://oprednisone.com/]prednisone 4 mg daily[/url]
[url=http://olisinopril.com/]buy zestril[/url]
Привет любители музыки!
Почему трек БАС от White Queen стал лидером танцполов? Певице удалось создать абсолютно завораживающую композицию, которая притягивает слушателей своей энергией и драйвом. DK пока что в тени этого хита!
White Queen снова поражает слушателей новым треком БАС. Ее музыка всегда пронизана силой и страстью, и этот рейв-хит не исключение. Поклонники уже заявляют, что этот трек стал одним из любимых.
Новый трек БАС от White Queen уже завоевывает сердца поклонников. Его вирусные мелодии и заразительный ритм не оставят равнодушным ни одного любителя танцев. DK может только мечтать о таком успехе!
https://music.apple.com/us/album/%D0%B1%D0%B0%D1%81-single/1734643362
[url=https://music.yandex.ru/track/123467211] слушать музыку шатунова [/url]
слушать музыку максим
послушать музыку из слово пацана
какую музыку послушать чтобы поднять настроение
техно рейв слушать
дайте послушать музыку
слушать рейв музыку
послушать музыку девяностых годов
послушать музыку девяностых
слушать музыку
послушать армянскую музыку
Удачи и хорошего вайба!
[url=https://lisinoprilgp.online/]cost of brand name lisinopril[/url]
[url=http://metforminbi.online/]metformin 1000 mg tablets cost[/url]
[url=https://synthroidsl.online/]synthroid 0.025 mcg[/url]
[url=http://tadalafilgf.com/]tadalafil tablets in uk[/url]
[url=http://olisinopril.com/]lisinopril 10 mg prices[/url]
otraresacamas.com
素晴らしい洞察と分析でした。大変参考になります。
[url=http://ismetformin.online/]metformin cost in usa[/url]
Very energetic blog, I liked that a lot. Will there be
a part 2?
[url=http://tadalafilgf.com/]buy generic cialis paypal[/url]
[url=http://tadalafilgf.com/]viagra vs cialis[/url]
[url=http://metformin.store/]prices for 1000 metformin[/url]
[url=http://azithromycinhq.com/]azithromycin 500mg lowest price online[/url]
say thanks to a lot for your website it aids a whole lot.
https://extrawalcz.pl
[url=https://bestprednisone.online/]prednisone 80 mg[/url]
[url=https://teplica-teplourala.ru]Стоимость теплицы из поликарбоната.[/url]
[url=https://teplica-teplourala.ru]Теплицы по низким ценам.[/url]
[url=https://teplica-teplourala.ru]Дешевые теплицы из поликарбоната цены.[/url]
[url=https://bestmedsx.online/]canadianpharmacyworld[/url]
[url=http://lisinoprildrl.online/]lisinopril tabs 10mg[/url]
[url=https://azithromycinmds.com/]can you buy zithromax over the counter in australia[/url]
[url=http://oazithromycin.com/]azithromycin drug[/url]