第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

Wordpress 定制器預(yù)覽不會(huì)刷新functions.php

Wordpress 定制器預(yù)覽不會(huì)刷新functions.php

PHP
人到中年有點(diǎn)甜 2021-06-10 17:36:55
所以我遇到了定制器預(yù)覽沒有完全刷新的問題。只有當(dāng)我手動(dòng)刷新頁面時(shí),我才能看到我的更改。我的一些代碼有助于在下面解釋。對于我的定制器設(shè)置,我的代碼看起來像這樣$wp_customize->add_section( 'theme_layout', array(        'title' => __( 'Layout', 'theme' ),        'priority' => 30) );$wp_customize->add_setting( 'theme_header_layout', array(         'default' => 'default',         'transport' => 'refresh',) );$wp_customize->add_control( new WP_Customize_Control( $wp_customize,'theme_header_layout', array(          'label' => __( 'Header', 'theme' ),          'section' => 'theme_layout',          'settings' => 'theme_header_layout',          'type' => 'select',          'choices' => array(               'default' => 'default',               'special_header' => 'Special Header',           )) ) );現(xiàn)在在我的functions.php中我有這樣的代碼//this is the code that doesn't seem to execute when the customizer refreshesif ( 'special_header' == get_theme_mod( 'theme_header_display' ) ):   function theme_special_header( $items ) {       $items .= do_shortcode('[special_header_shortcode]');//This shortcode exists I just didnt bother mentioning it here   }   add_action( 'wp_nav_menu_secondary-menu_items', 'theme_special_header' );//Adds shortcode to menu with id of secondary-menuendif;當(dāng)我轉(zhuǎn)到定制器并選擇“特殊標(biāo)題”時(shí),這一切都很好接受,定制器會(huì)刷新,并且在完全刷新頁面之前我看不到我的更改。
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 137 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號