• Hello!
    I have a bunch of custom CSS on my blog. It all works fine on my desktop and works mostly fine on mobile unless I’m on an individual blog post. Then none of my custom font colors work and my menu bar defaults to the default WP menu. Here are example pages to check out.
    https://thelightowl.com/blog should work fine on mobile
    https://thelightowl.com/2017/06/19/mindful-fitness/ This does not.

    The tricky thing is, if I set my phone to view it as desktop, it switches to the mobile compatible view anyway and then my custom CSS and my menu bar All work correctly.

    Let me know if you need additional clarification. I know, it is a confusing issue.

    Thanks!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi there,

    none of my custom font colors work

    Could you elaborate a bit on this?
    Where can I see the color you are wanting, and what text should be that color?
    I’ve looked at the post on a phone and on a laptop at the same time, but I’m not spotting any obvious differences.

    my menu bar defaults to the default WP menu

    This is what I see on mobile:

    Should something else appear instead?

    Hi,

    The one problem I noticed is that your mobile menu’s menu page Blog has many subpages and those subpages are visible. You can make them only show when someone clicks on Blog or some other page which has subpages. I have written a piece of code for you. You can add it to your CHILD THEME’S functions.php file. Do not add it to parent theme’s funcns.php file since whenever theme’s updated code adde to parent theme’s functions.php file will be deleted.

    This code will definitely won’t throw an error, if it does remove it. There’s goog chance it’d work ??

    Ok:

    add_action( ‘wp_footer’, function() {

    if ( wp_is_mobile() ) {?>

    <script>
    (function($) {
    ‘use strict’;

    $(‘.sub-menu’).hide():
    $(“li:has(ul)”).click(function(){
    $(this).children(“ul”).slideToggle();
    })(jQuery);
    </script>

    <?php }} );

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom css not working on mobile individual posts’ is closed to new replies.