Currently I took out this function to show the Back to Top link but I just need to get the image in place again
Currently I have the following custom css in place:
.back-to-top {
position: fixed;
bottom: 20px;
right: 10px;
z-index:250;
}
Ok, so I was able to get the image and back to top link to exist in same span by moving the logo to the tc_colophon_left_block and having the back to top link to occupy the tc_colophon_right_block. I would still like to figure out how to have both of them exist in the same block.
Ok, I’ve been trying for the longest to get this code to work but I am having some issues:
add_filter('tc_colophon_right_block', 'my_imageandtop');
function my_imageandtop(){
$img_url = get_stylesheet_directory_uri().'/imgs/hdfooterlogo.png'; //put your image in child-theme/imgs
//$backtop = sprintf('<div class="%1$s"><p class="pull-right"><a class="back-to-top" href="#">%2$s</a></p></div>', 'Back to Top');
$width = '250px';
$height = '79px';
$img = '<a href="http://www.hunterdouglas.com/" target=_blank><img alt="logo" src="'.$img_url.'" width="'.$width.'" height="'.$height.'" class="pull-right"></a>';
return '<div class="span4 right-image"> '.$img.' </div>';
}
I just answered this on your other thread.
I have the following code working to place an image in the right block
add_filter('tc_colophon_right_block', 'my_imagetop');
function my_imagetop(){
$img_url = get_stylesheet_directory_uri().'/imgs/hdfooterlogo.png'; //put your image in child-theme/imgs
$width = '250px';
$height = '79px';
$img = '<a href="http://www.hunterdouglas.com/" target=_blank><img alt="logo" src="'.$img_url.'" width="'.$width.'" height="'.$height.'" class="pull-right"></a>';
return '<div class="span4 right-image">'.$img.'</div>';
}
Now I’m trying to if I can have the back to top link and the image be in the same right block. When I try to do it the image overrites the back to top link. Here is the link that I want to add:
sprintf('<div class="%1$s"><p class="pull-right"><a href="#">%2$s</a></p></div>)
I see in the function.php for the base theme that there is a function for the back-to-top. I’ve been trying to use the html in there to get it to show up in this custom function but I’m not having any luck
Ok, figured it out:
add_filter('tc_colophon_right_block', 'my_imageandtop');
function my_imageandtop(){
$img_url = get_stylesheet_directory_uri().'/imgs/hdfooterlogo.png'; //put your image in child-theme/imgs
$backtop = '<div class="span4 backtop"><p class="pull-right"><a class="back-to-top" href="#">Back to top</a></p></div>';
$width = '250px';
$height = '79px';
$img = '<a href="http://www.hunterdouglas.com/" target=_blank><img alt="logo" src="'.$img_url.'" width="'.$width.'" height="'.$height.'" class="pull-right"></a>';
return '<div class="span4 right-image"> '.$img.' </div> <div class="span4 right-backtop"> '.$backtop.' </div> ';
}
The main thing from the hooks article is the fact that I needed to use standard html in the variables.
Thanks