开发者

I'm building a theme for tumblr and the {HasPages} doesn't seem to work properly

I've put the HTML draft of the theme so far, with minor CSS e开发者_C百科dits.

Currently I have all the block posts and everything else that's essential to a tumblr theme but I can't seem to get the {HasPages} block to work properly.

I've tested it on a different tumblr, also. There are pages created and I already have provided some basic CSS for it just in case. But there isn't anything showing up.

Has anyone has this problem and if so, is there a solution I'm missing? The code to display the pages is included.

{block:HasPages}
    <ul>
        <li><a href="/">Home</a></li>
        {block:Pages}<li><a href="{URL}">{Label}</a></li>{/block:Pages}
    </ul>
{/block:HasPages} 

Also, is this a valid web masters' question. I'm not sure.


I just had this issue: a link to a page I created didn't show up.

I solved this by checking off "Show a Link to this Page" in the Page options. To find this:

Go to tumblr.com. In the top navigator click the gear. This is where the settings are. On the side, click on the blog you want to customize. A customize button should show up beside the name "Theme". Click on this button. Now your blog will show up with a Customize panel. In the Customize panel there should be a Pages section. Click the Edit button beside the page and a window will pop up. You can find the "Show a Link to this Page" option in this window.

Let me know if you need any clarification.


As far as I can see your code is right. Have you clicked the 'show a link to this page' checkbox, which is at the bottom of the page edit popup? I bet that's it... :)


I have also been having this problem. However, everything works correctly on my actual page, even though the theme editor does not appear to be aware of the block on my custom theme, nor does the theme preview seem to be aware of the pages tagged to show.

Have you tried saving your theme and checking the links on the live page?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜