我嘗試了所有可能的方式找到googl-ing,但始終沒有成功。我想要實現的目標是讓PC版本的欄杆始終像移動版本一樣。 This是我正在修改的網站。我已經嘗試使用body_class('mobile');
和add_filter()
方法。我想添加移動課程,因爲我在工作時注意到移動和PC版本之間的變化是該課程以及其他一些我已經能夠改變的內容。任何建議。哦,我正在使用的主題是Salient from NectarTheme。無法將課程添加到主體
EDIT 1
從的header.php類:
<body <?php body_class('test'); ?> data-footer-reveal="<?php echo $footer_reveal; ?>" data-footer-reveal-shadow="<?php echo $footer_reveal_shadow; ?>" data-button-style="<?php echo $button_styling; ?>" data-header-inherit-rc="<?php echo (!empty($options['header-inherit-row-color']) && $options['header-inherit-row-color'] == '1' && $perm_trans != 1) ? "true" : "false"; ?>" data-header-search="<?php echo $headerSearch; ?>" data-animated-anchors="<?php echo (!empty($options['one-page-scrolling']) && $options['one-page-scrolling'] == '1') ? 'true' : 'false'; ?>" data-ajax-transitions="<?php echo (!empty($options['ajax-page-loading']) && $options['ajax-page-loading'] == '1') ? 'true' : 'false'; ?>" data-full-width-header="<?php echo $fullWidthHeader; ?>" data-slide-out-widget-area="<?php echo ($sideWidgetArea == '1') ? 'true' : 'false'; ?>" data-loading-animation="<?php echo (!empty($options['loading-image-animation'])) ? $options['loading-image-animation'] : 'none'; ?>" data-bg-header="<?php echo $bg_header; ?>" data-ext-responsive="<?php echo (!empty($options['responsive']) && $options['responsive'] == 1 && !empty($options['ext_responsive']) && $options['ext_responsive'] == '1') ? 'true' : 'false'; ?>" data-header-resize="<?php echo $headerResize; ?>" data-header-color="<?php echo (!empty($options['header-color'])) ? $options['header-color'] : 'light' ; ?>" <?php echo (!empty($options['transparent-header']) && $options['transparent-header'] == '1') ? null : 'data-transparent-header="false"'; ?> data-smooth-scrolling="<?php echo $options['smooth-scrolling']; ?>" data-permanent-transparent="<?php echo $perm_trans; ?>" data-responsive="<?php echo (!empty($options['responsive']) && $options['responsive'] == 1) ? '1' : '0' ?>" >
編輯2
我試圖在頭文件手動設置的類。 ..好吧,即使這樣,它也不起作用!我真的不知道該怎麼辦!
編輯3
好吧,發現菜單中的解決方案,但我仍然無法理解爲什麼我chenges不工作! (www.youtube.com/watch?v=VzsSTnmGYAQ)
當前'body'標記代碼在頭文件中看起來像什麼?因爲你正在爲你的身體獲得類,可能來自主題開發者添加的代碼。 '主頁page-id-101 page-template-default自定義背景測試wpb-js-composer js-comp-ver-4.7 vc_responsive' – APAD1