Q.1280px以下の画面ではスマートフォン用のグローバルナビゲーションとなりますが、1200pxまでPCのグローバルナビゲーションを表示したい
A.該当ファイルを編集してください
編集するファイル:functions/head.php
<link rel="stylesheet" media="screen and (max-width:1280px)" href="<?php echo get_template_directory_uri(); ?>/css/responsive.css?ver=<?php echo version_num(); ?>"> <link rel="stylesheet" media="screen and (max-width:1280px)" href="<?php echo get_template_directory_uri(); ?>/css/footer-bar.css?ver=<?php echo version_num(); ?>">
※※1280pxの値を任意(例では1200px)の値へ
編集するファイル:js/jscript.js
編集する箇所:
if (width > 1280) { //PC $("html").removeClass("mobile"); $("html").addClass("pc"); mobileMenu = false; if($("#mobile_menu").length){ $("#mobile_menu").remove(); } $("#menu_button").css("display","none"); $("#global_menu").show(); $("#global_menu li:not(.custom-taxonomy-menu)").hover(function(){ $(">ul:not(:animated)",this).slideDown("fast"); $(this).addClass("active"); }, function(){ $(">ul",this).slideUp("fast"); $(this).removeClass("active"); });
※※1280の値を(例では1200)へ
この記事は役に立ちましたか?
もし参考になりましたら、下のボタンで教えてください。
今後の記事作成の参考とさせて頂きます!