<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>
$(function() {
if ( $("li").is(".current-cat") ) {var num = $(".current-cat")[0].className.match(/\d+/);
alert(+num)};
});
</script>
</head>
<body>
<ul>
<li class="cat-item cat-item-4 current-cat"><a href="#">Wordpress</a></li>
<li class="cat-item cat-item-1"><a href="#">Верстка</a></li>
</ul>
</body>
</html>