Default Nav Highlight

Assuming you are loading a single piece of content like one Post (unlike the homepage where you’re combining multiple Pages with JS), something like this should do it:

<script type="text/javascript">
    $(document).ready(function(){
        // get each menu item
        var hasHighlight = 0;
        // loop through to see if any have "current_page_item" class
        $("#nav ul li").each(function(obj) {
            if($(this).hasClass("current_page_item")) { hasHighlight++; }
        });
        // if none of the items are highlighted using "current_page_item" class
        if(hasHighlight == 0) {
            $("#nav ul li:first-child").addClass("current_page_item");
        }
    })(jQuery);
</script>

Enqueue this sitewide so that anytime there is a menu with id “nav” it will check and add a highlight to “Home” if nothing is highlighted.

error code: 523