php - element on main Tumblr page ONLY - works but breaks control buttons -


i used snippet of code found on another thread here implement 'custom html' feature on theme. it's 'sticky post', or additional {description} block. functions own purposes, interferes tumblr's control buttons.

if user opts out of using feature (leaves field blank) tumblr control buttons disappear entirely, front page , individual posts. if use feature, front page display (control buttons intact), individual posts missing like/reblog/etc. controls.

i tried temporary workaround adding {likebutton} , (reblogbutton} posts, inexplicably, button (but not reblog one) behaves same way - displaying on front page, or not displaying @ all, depending on {ifcustomhtml}.

here block:

{block:indexpage} <div id="index" {block:searchpage}style="display: none;"{/block:searchpage} {block:tagpage}style="display: none;"{/block:tagpage}>  {block:ifcustomhtml} <body class="page{currentpage}"> <div id="customhtml"> {text:custom html}     </div></body> {/block:ifcustomhtml} </div> {/block:indexpage} 

and here styling, in case:

#customhtml { display:none !important; font-family: {font:post body} !important; background: url('{image:post background}') top left fixed repeat; color: {color:post body}; margin: 0 0 10px 0; padding: 10px; position: relative; -moz-border-radius: {text:corner radius}px; -webkit-border-radius: {text:corner radius}px; border-radius: {text:corner radius}px;} .page1 #customhtml{display:block} 

the entire code here: https://raw.github.com/teratoma/reduxredux/master/reduxredux

an example of problem here: http://reduxredux.teratoma.tk (scroll down , click on first post permalink , hey presto! control buttons vanish.)

i admit code cluttered , amateurish i'm still learning, appreciate willing @ ugly coding.

your html invalid. can't have more 1 body element on page, , can't wrapped in divs. remove opening , closing body elements customhtml block. it's important tumblr_controls iframe loads (the join / follow buttons in top right corner), otherwise buttons won't work -- when html invalid iframe might not load correctly. fix , should good.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -