-
AuthorPosts
-
March 2, 2017 at 3:51 pm #754386
Hello,
I ‘ve created 2 touch-icons and want to place the following tags in the header:
<link rel=”apple-touch-icon” sizes=”120×120″ href=”/apple-touch-icon-120×120-precomposed.png” /> <link rel=”apple-touch-icon” sizes=”152×152″ href=”/apple-touch-icon-152×152-precomposed.png” />I think I should create a header.php in my child theme and fill in some php-code to add that. Could you please tell me how my child-theme header.php should look like? I have no programming skills for php.
Another issue: I would like to have a full size (or nearly full size) image in the header. The height should not be the full size of the header’s height and the image should not overlap my logo, but should be placed under the logo. Up to now my solution was to put the image inside of a fullwidth color section on each single page. This seems to be no good solution and may perhaps slow down the loading performance of the pages.
Please have a look on my skite to understand what I mean. With a new solution for the image in the header my site should look nearly just the same. Maybe there should be a little space between the logo and the image.Regards
lebenspraxis
March 4, 2017 at 6:06 am #755480Hey lebenspraxis,
Please try this in your child theme’s functions.php file:
function lebenspraxis_add_header_meta() { ?> <link rel=”apple-touch-icon” sizes=”120×120″ href=”/apple-touch-icon-120×120-precomposed.png” /> <link rel=”apple-touch-icon” sizes=”152×152″ href=”/apple-touch-icon-152×152-precomposed.png” /> <?php } add_action( 'wp_head', 'lebenspraxis_add_header_meta');
Best regards,
RikardMarch 4, 2017 at 6:01 pm #755637Thanks Rikard,
sorry, it doesn’t work. Don’t know why. There’s not much in my child theme’s function.php, have a look:
<?php
/*
* Add your own functions here. You can also copy some of the theme functions into this file.
* WordPress will use those functions instead of the original functions then.
*/
function lebenspraxis_add_header_meta() { ?>
<link rel=”apple-touch-icon” sizes=”120×120″ href=”/apple-touch-icon-120×120-precomposed.png” />
<link rel=”apple-touch-icon” sizes=”152×152″ href=”/apple-touch-icon-152×152-precomposed.png” />
<?php
}
add_action( ‘wp_head’, ‘lebenspraxis_add_header_meta’);Does the file need some closing php tag? I tried, but it also didn’t work. What’s going wrong here?
And what’s about the other thing putting the full width image into the header instead of having it in each page’s body?
Best Regards,
lebenspraxis
March 5, 2017 at 2:10 am #755778Hi,
I believe there is a extra ?> in your code, try this:function lebenspraxis_add_header_meta() { <link rel=”apple-touch-icon” sizes=”120×120″ href=”/apple-touch-icon-120×120-precomposed.png” /> <link rel=”apple-touch-icon” sizes=”152×152″ href=”/apple-touch-icon-152×152-precomposed.png” /> } add_action( 'wp_head', 'lebenspraxis_add_header_meta');
Best regards,
MikeMarch 5, 2017 at 1:24 pm #755909Hey Mike,
thanks for your support! Sorry, your code didn’t work, but I figured out, why Rikard’s code seemed to fail. Indeed Rikard was right. The tags are written into the produced files. As I first controlled it after putting into Rikard’s code I forgot that I am running the cache enabler plugin producing static html-files. I had to clean the cache first to see Rikard’s code showing up in the files. Now I have to find out why the test by 1&1 is anyway telling me that there is no touch-icon, although the tags are in the code and the icons in the root directory.
It would be great, if you had a solution for getting the fullwidth-image into the header area, so that it’s displayed under the logo and maybe has a little space inbetween. Please have a look at my site to see what I mean. The result should be nearly the same as now. Up to now I have the image in a fullwidth color container in the body of each site.
Best regards,
lebenspraxis
March 5, 2017 at 7:23 pm #755998Hi!
Thank you very much for your suggestion.
Please consider posting it here
Try post it hereSo Kriesi can review and add it maybe on a next update.
Regards,
BasilisMarch 5, 2017 at 11:04 pm #756053Hi Basilis,
oh yes it would be great to have this as a new feature and I will consider a feature request. For the moment I would prefer to have a solution for getting the image into the header as I described. For me it’s an issue according to pageload time, which should be better in my case. I’d like to get a faster pageload and I think for that it would be good to have the image in the header, but sure I have not much Knowledge about all these things. So, as I said, I would be glad if somebody had some php code for solving this.
Best regards,
lebenspraxis
March 8, 2017 at 7:59 pm #757996Hi,
please, is there anybody, who will help me get the image into the header? I’d like to do this now.Regards,
lebenspraxis
March 10, 2017 at 4:53 pm #759013Hi,
unfortunately Enfold does not have such a function, so we can’t really help you with this. One thing you could try is this: http://kriesi.at/documentation/enfold/adding-a-widget-area-to-the-header/, but I doubt it is what you’re looking for. Another thing you can try is to search for a plugin with such a function.
Best regards,
Andy -
AuthorPosts
- You must be logged in to reply to this topic.