Tagged: enfold update, table of contents
-
AuthorPosts
-
October 1, 2021 at 8:39 pm #1323197
Hi guys,
so the last enfold update jumbled some stuff on my Website. I already fixed missing Footer by deleting the header.php in my child theme. But since the update my table-of-contents widgets do not work anymore. The Title of the widget is showing, but no content.
For some reason i have postlider.php in my child theme. When i delete it, table of contents starts showing content – but very strange one. I see for example not the headings inside the blog post, but titles of other blog posts. I have no problem with deleting postslider.php from my child theme, since i don’t know why i have it anyway and if it’s important i will find out. But deleting doesn’t solve my problem. The table-of-contents widget is showing me post titles instead of headings.
Any idea what this could be? The only two more .php files i have in my child theme are functions.php and comments.php. But I think the problem lies in postslider.php, since when i delete it table of contents start showing content, but the wrong one ..
Edit: Same problem with switching to enfold theme instead of enfold child theme
Thanks for your help!
- This topic was modified 3 years, 1 month ago by hammerseo.
October 1, 2021 at 10:03 pm #1323200I have the same issue and I found out that table of contents does show heading elements that have a custom class. Try creating a header with “Special heading” element. Or edit an existing header in text mode and add a custom class to it ie.
<h2 class="pagetitle">Title text</H2>
These heading will show up on the TOC widget just fine, but not the bare heading elements without a custom class.
I have tested this and I can replicate the issue by updating theme on a previously functioning site.
October 1, 2021 at 10:44 pm #1323203Hey SML, you are right. It works, but wow. I guess the TOC widget is broken then?
October 2, 2021 at 7:12 am #1323247Hi hammerseo,
Please send us a temporary WordPress admin login and login URL so that we can have a closer look. You can post the details in the Private Content section of your reply.
Best regards,
RikardOctober 2, 2021 at 12:50 pm #1323266Hi Rikard,
sure. Guess it’s the same problem as SML has here https://kriesi.at/support/topic/toc-widget-content-disappers-after-update-to-4-8-6-3/
- This reply was modified 3 years, 1 month ago by hammerseo.
October 2, 2021 at 4:38 pm #1323276Hi,
Sorry for the problems. Seems to be jQuery 3.x related (or WP 5.8.1) as we did not change anything with TOC.
But we could fix it.
Please update
enfold\js\avia-snippet-widget.js
with contents of
Do not forget to make a backup of the file for a fallback and clear server and browser cache.
If you need help let us know and we can do it for you.
Fix is already part of the next update.
Best regards,
GünterOctober 2, 2021 at 5:11 pm #1323280Hi Günter,
thanks for your advice. Unfortunately this does not solve the problem. I replaced the file, deleted browser and clouflare cache – still not working.
Edit: On some blog posts i gave my headsings a class just as workaround as SML mentioned. Actually this bug brings quite a nice feature, because i can more granularly decide which headings should be displayed in the toc widget, instead of all h2, h3, … . Can i somehow keep this feature as soon as you fix the toc widget to work normally again?
Best Regards
- This reply was modified 3 years, 1 month ago by hammerseo.
October 3, 2021 at 5:18 am #1323318Hi hammerseo,
The fix posted by Günter is working on my end, which headers are not included in the example post you linked to? Also, are we allowed to add the fix for you, to make sure that it’s added correctly?
Best regards,
RikardOctober 3, 2021 at 4:03 pm #1323340Hi Rikard,
i have read in another post to disable cache first – didn’t think of it, it’s working properly now :)
Thanks!
But still: can i somehow exclude or include specific headings from toc? I liked the workaround and to choose which of the headings should be displayed in toc.
Best Regards
October 4, 2021 at 8:24 am #1323393Hi,
Thanks for the update. Which workaround are you referring to? If you want to hide specific headers then you can try to target its link URL, like so:
.avia_auto_toc a[href="#title-2-h2-with-custom-class"], .avia_auto_toc a[href="#title-2-h2-with-custom-class"] span:after, .avia_auto_toc a[href="#title-2-h2-with-custom-class"]:after { display: none; }
Simply replace this part; #title-2-h2-with-custom-class, with the URL of the link in the widget which you want to hide.
Best regards,
RikardOctober 4, 2021 at 12:11 pm #1323436Hi Rikard,
the workaround SML postet before we got a fix. Before replacing avia-sinppet-widget.js I could give a class to a heading and it showed up inside the toc widget – all other headings did not.
Your suggestion is right but pretty vulnerable to errors. What if i want to hide a URL in blogpost A but show it in blogpost B – then i had to write even more css code and target blog posts.
Also the elements are still being loaded in the source code. Can i somehow prevent specific headings from being loaded at all? Not “do not display this heading” but “do not even load this heading if it has specific conditions”. I mean it did work somehow when toc was broken :-)
Thanks and Best regards
October 4, 2021 at 12:27 pm #1323443Hi,
Did you check the options of this widget in widget area:
Exclude headlines by class
Select headlines to includeBest regards,
GünterOctober 5, 2021 at 3:00 pm #1323655Hi Günter,
well, i should have, but no … Danke!
Best Regards
October 6, 2021 at 5:39 am #1323707Hi,
Great, I’m glad that Günter could help you out. Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
RikardOctober 6, 2021 at 10:26 am #1323731Hi Rikard,
you can close it, thanks.
Best regards
October 7, 2021 at 8:25 am #1323849 -
AuthorPosts
- The topic ‘Enfold 4.8.6.3 – Table of Contents doesn't work’ is closed to new replies.