How to make a Tumblr Banner link to a site?

China☆狼群 提交于 2019-12-20 04:25:23

问题


I know that this question has already been asked, but the HTML I am looking at has been written in a strange format, in my opinion. I already looked at this thread: How do I make my banner in tumblr link to another site?, but it wasn't helpful, as that "a href" bit is just missing.

<div class="header">

{block:IfHeaderImage}<img style="{block:IndexPage}width:520px;{block:IndexPage} {block:PermalinkPage}width:500px;{/block:PermalinkPage} overflow:hidden; float:left; padding-bottom:15px;" src="{image:header}" {/block:IfHeaderImage}

<div class="blogtitle"{Title}</div>

<div style="text-align:right;">

</div></div>

<div style="padding-top:15px;"><div id="content">

Since it's missing that "a href" part, I don't know where to put the link. Can anyone help, please?


回答1:


Here:, change # to which link.

<a href="#">
<div class="header">

{block:IfHeaderImage}<img style="{block:IndexPage}width:520px;{block:IndexPage} {block:PermalinkPage}width:500px;{/block:PermalinkPage} overflow:hidden; float:left; padding-bottom:15px;" src="{image:header}" {/block:IfHeaderImage}

<div class="blogtitle"{Title}</div>

<div style="text-align:right;">

</div></div>
</a>

<div style="padding-top:15px;"><div id="content">



回答2:


<div class="blogtitle"><a href="yournontumblr.url">{Title}</a></div>

Put the link there, inside the divs.

{word} <- This notation is used on tumblr to call up various page elements that are user defined. It's based on PHP, if I'm not mistaken. {Title} is something that you define in the content management system/dashboard.

Hope that clears it up.




回答3:


Assuming in the tumblr Customize menu, you have a header image uploaded to header and the option IfHeaderImage checked in the Tumblr Customize menu:

{block:IfHeaderImage}<a href="INSERTURLHERE"><img style="{block:IndexPage}width:520px;{block:IndexPage} {block:PermalinkPage}width:500px;{/block:PermalinkPage} overflow:hidden; float:left; padding-bottom:15px;" src="{image:header}" /></a>{/block:IfHeaderImage}

The link tags <a href ... > wrap around the img tag, rendering that image a link. Change the INSERTURLHERE to the URL of the site you wish to link to.

Otherwise, if you decide not to have a header image, gersande's method works.



来源:https://stackoverflow.com/questions/16509265/how-to-make-a-tumblr-banner-link-to-a-site

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!