-
AuthorPosts
-
March 19, 2019 at 8:05 pm #1080496
I have tried changing the subtext settings in my Custom CSS to h2 for logo, but when I view the code, my logo text is still showing with an H1 tag.
How do I change the heading tag for the Logo (top left of my site . . . the lettering size as shown is fine, it’s just the tag I want to change).
Thanks y’all
JonMarch 22, 2019 at 6:00 am #1081728Hey gatehealing,
Thank you for using Enfold.
You can’t change the html markup with css. Did you put the “avf_logo” filter in the Quick CSS field? That filter should go in your functions.php file as shown in the following thread.
// https://kriesi.at/support/topic/put-h1-tag-on-logo-only-on-my-homepage/#post-955255
You can replace h1 with h2.
Best regards,
IsmaelMarch 22, 2019 at 6:09 am #1081733Hi Ismael,
I am not sure what “avf_logo” is. Here’s what I have for quick css that pertains to logo (I’ll check out that link to see if it gets me what I need . . . in the meantime, in the css below, where I have h2 (I bolded the 2 of them), should I leave them as h2 or change them to something else? The quick css below came from y’all due to some overlap issues, etc.):/*———————————*/
/* CSS – Subtext on right*/
/*———————————*/
#top .logo,
#top .logo a {
overflow: visible;
}
/*—————-*/
/* Subtext styling */
/*—————-*/
.logo .subtext h2 {
font-size: 20px;
font-weight: 550;
}.logo .subtext {
position: absolute;
top: 50%;
right: 0;
width: 275px;
transform: translate(102%, -50%);
z-index: 999;
}/*——————–*/
/* Hide logo in mobile*/
/*——————–*/
@media only screen and (max-width: 767px) {
.responsive #top .logo img {
display: none !important;
}
.responsive #top .logo .subtext {
transform: translate(2%, -50%) !important;
width: 235px !important;
}
.logo .subtext h2 {
font-size: 17px !important;
}
}
@media only screen and (min-width: 768px) and (max-width: 1023px) {
.responsive #top .logo .subtext {
display: none !important;
}
}
@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape) {
/* For landscape layouts only */
}March 22, 2019 at 8:29 am #1081750First of all if you only like to influence the subtext style why don’t you change your css rules to h1 ?
______
i thought you will do it because of seo reasons than have a look if your child-theme functions.php file got an entry like this:
search for avf_logo_subtext
this code is only an example code – i use it if i want to place wordpress site name and wordpress description to my logoIf you got something like that – you can change here your h1 to h2 ( but don’t forget to do it twice – opening and closing tag)
add_filter('avf_logo_subtext', 'kriesi_logo_addition'); function kriesi_logo_addition($sub) { $sub .= "<h1 class='logo-title'>"; $sub .= get_bloginfo( 'name', 'display' ); $sub .= "</h1>"; $sub .= "<h2 class='logo-title logo-subtitle'>"; $sub .= get_bloginfo( 'description', 'display' ); $sub .= "</h2>"; return $sub; }
you existing code may look like this:
add_filter('avf_logo_subtext', 'kriesi_logo_addition'); function kriesi_logo_addition($sub) { $sub .= "<h1>Jonathan F. Anderson, LPC-s</h1>"; $sub .= "<h1>Gate Healing, PLLC</h1>"; return $sub; }
March 22, 2019 at 6:22 pm #1081964Guenni007
So I simply went in to functions.php and changed the h1’s to h2’s. That seemed to do the trick.
I am going to play with the other code you put as an example to see if I like that.
Should I leave my Quick CSS code has h2 as well, or change it back to h1? I want to be sure I only have on h1 on my pages, and that h1 needs to be the page title.
Thanks!
JonMarch 23, 2019 at 9:42 am #1082089if you like to have on those headings at the logo the h2 tag – and you want to have influence over these lines in your css – you have to change it to h2.
The rules in CSS begins always with the selector. Selector is what selects the element to address. So no influence if the selector does not fit to the tag you want to select. Simple – isn’t it?March 23, 2019 at 9:57 am #1082091Seems to be . . . but I’ve managed to crash my entire site before doing some simple updates, so I’ve learned to be extra careful (and have backups!)
Thanks!
Jon -
AuthorPosts
- You must be logged in to reply to this topic.