Wordpress带有URL链接的背景图像


Wordpress Background image with URL link

我有来自wordpress主题的这些代码,我希望我的背景图像有一个到其他网站的链接

<?php get_header(); ?>
<?php if (class_exists('BlackfyreMultiPostThumbnails')) : $custombck = BlackfyreMultiPostThumbnails::get_post_thumbnail_url(get_post_type(), 'header-image', $post->ID, 'full' ); endif; ?>
<?php if(empty($custombck)){}else{ ?>
<style>
    body.page{
    background-image:url(<?php echo esc_url($custombck) ; ?>) !important;
    background-position:center top !important;
    background-repeat:  no-repeat !important;
}
</style>
<?php } ?>

像这样的东西可能很合适:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Example</title>
<style>
    BODY.enterPage{
    cursor:hand;
}
</style>
<script>
   function goto(){
       location.href = "http://www.stackoverflow.com"
   }
</script>
</head>
<body class="enterPage"  onclick="goto();">
    <a href="www.stackoverflow.com">Enter</a>
</body>
</html>

来自这个论坛