Plugin Author
LuckyWP
(@theluckywp)
Hello!
Headings in your post when showed ToC displayd as bold?
Show page url.
Thread Starter
Manny
(@thewebnerd)
Plugin Author
LuckyWP
(@theluckywp)
I don’t understand problem. Can you describe it in more detail?
Thread Starter
Manny
(@thewebnerd)
Like I said earlier I am talking about the title “Table Of Content”. When you inspect the title “Table of Content” it is in bold instead of html header tag like h2,h3, or h4. So we like to make that title “Table of Content” a html tag. Any code or recommendation on how to do that?
Plugin Author
LuckyWP
(@theluckywp)
This unavailable yet.
In next version we will add new hook filter lwptoc_title_tag and you can use this code:
add_filter('lwptoc_title_tag', function() { return 'h2'; });
Thread Starter
Manny
(@thewebnerd)
Thank you. So any idea when that next update will be? Also,for that code that you said that I can use for now, where do you put it? Function.php?
Plugin Author
LuckyWP
(@theluckywp)
We released new version 2.1.2 just now.
Yes, add this code to functions.php in your theme.
Thread Starter
Manny
(@thewebnerd)
Ok I am a little confused. I updated the plugin now and I still don’t see the option to pick the title as an HTML header tag.
So after updating the plugin I have to add this add_filter(‘lwptoc_title_tag’, function() { return ‘h2’; }); in the fucntion.php? Or was that meant for before the update?
Plugin Author
LuckyWP
(@theluckywp)
Yes.
In old version don’t have hook lwptoc_title_tag and this code don’t work.
Now you should add code add_filter('lwptoc_title_tag', function() { return 'h2'; }); to functions.php.
Thread Starter
Manny
(@thewebnerd)
Is there a way to make it so that each page Html header tag is different? The code you gave me seems to only make it one header tag for all pages.
-
This reply was modified 6 years, 1 month ago by
Manny.
Plugin Author
LuckyWP
(@theluckywp)
You can use conditions. For example:
add_filter('lwptoc_title_tag', function() {
if (is_page()) {
return 'h2';
} else {
return 'h3';
}
});