Change H2 Tag
Post count: 12Sauer1972March 17, 2015 at 8:09 pm #10036
I need to change the Menu Items (side menu) from H2 to H3. How can I do this?
Thx for your great support – again… 🙂
TobiasPost count: 7592AdekMarch 18, 2015 at 5:38 am #10059
Unfortunately, there is no option to achieve that. You will need to edit the original file of themes to achieve that. Anyway may i know why you want to change the h2 tag? if you just want to change the font size you can use css code.
Thank youPost count: 94dmitri1999March 18, 2015 at 5:43 am #10060
I was watching this thread as I also wanted to change it to H4 or H5. Menu should not have H1 or H2 tags as they are reserved for important content. It is not advisable to have them repeat on the page so if H2 tag is already used, it shouldn’t be used again.Post count: 12Post count: 7592AdekMarch 18, 2015 at 6:12 pm #10095
You can edit this file
jkreativ-themes/lib/init-menu.phpthen jump into line 280 and change the h2 tags with own your need.
Thank youPost count: 94dmitri1999March 19, 2015 at 3:34 am #10107
Doesn’t appear to be working. Switched it to H5 and it still shows h2Post count: 7592AdekMarch 19, 2015 at 5:11 am #10108
Please make sure if you’ve been change the close tag as well. Can you provide me the url of those page, i will check it directly if there some error occurs.
Thank youPost count: 94dmitri1999March 20, 2015 at 5:42 am #10132
site url: http://goo.gl/6i9ZFd
This is the part of the code I edited:123456$item_output = $args->before;$item_output .= '<a'. $attributes .'>';$item_output .= $args->link_before . '<h4>' . apply_filters( 'the_title', $item->title, $item->ID ) . '</h4>' ;$item_output .= '</a>';$item_output .= $args->after;Post count: 7592AdekMarch 20, 2015 at 7:33 am #10149
Please make sure if you’re using side navigation on those page to see your code works or not.
Thank youPost count: 94dmitri1999March 20, 2015 at 6:39 pm #10170
I don’t understand, why would I need to use side navigation? I am using top navigation and the issue is with the top navigation.Post count: 7592AdekMarch 24, 2015 at 1:08 am #10205
Firstly, on these theme we have 2 kind of navigation positions which is top navigation and side navigation. On each navigation will handled by different navigation template file.
In this case, as Tobias said on above he is using Side Menu (“I need to change the Menu Items (side menu) from H2 to H3. How can I do this?”). So i provide custom code and it will works if you’re using side navigation.
So if you have top navigation those code will not works. Actually on top navigation, menu text will wrapper by anchor tags not H2 as you said and you can check it by inspect element on menu text – top navigation.
I just want to make more clear in this case and hope you understand. Let me know if you have further question.
Thank youPost count: 94dmitri1999March 27, 2015 at 11:20 pm #10368
You are right, the desktop navigation doesn’t have the h2 tags.
After further inspection it seems it’s actually for the mobile menu, which is using the h2 tags.
Is there a fix for that?12345<!-- mobile menu --><div id="main-mobile-menu" class="mobile-menu" data-position="left"><div class="mobile-main-menu mobile-menu-content"><h2>Menu</h2><ul id="menu-main-menu"Post count: 94dmitri1999March 30, 2015 at 5:23 pm #10429
bumpPost count: 7592AdekMarch 31, 2015 at 7:44 am #10446
Yes, it using H2 tag. Because this is the title (not menu items) of mobile menu and i think this is natural thing if we use heading tag. But if you want to make change in there you can edit this file
You must be logged in to reply to this topic.