Advertisement
fauzanjeg

Force Show Category for All Display with PHP code

Aug 11th, 2021
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.65 KB | None | 0 0
  1. /* Force Show Category for All Display with PHP code */
  2. function show_category_in_mobile_display_with_php_code() {
  3.     if ( is_single() && is_singular() ) {
  4.         ?>
  5.         <style>
  6.             /* Force Show Category for All Display */
  7.             .entry-header .jeg_meta_category {
  8.                 display: unset!important;
  9.             }
  10.             @media only screen and (max-width : 568px) {
  11.                 .entry-header .jeg_meta_category {
  12.                     display: unset!important;
  13.                 }
  14.             }
  15.             @media only screen and (max-width: 480px) {
  16.                 .entry-header .jeg_meta_category {
  17.                     display: unset!important;
  18.                 }
  19.             }
  20.         </style>
  21.         <?php
  22.     }
  23. }
  24. add_action( 'wp_head', 'show_category_in_mobile_display_with_php_code' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement