-
Hello,
I brought this topic before and is something acting quite weird.
I installed the plugin table of contents + (TOC+), which works great on normal posts, but as soon as I change the template from standard to video, the TOC disappear. My guess is the video in the header is overwriting it, cause every time I switch to standard format, will show up.
Can you let me know how to fix it?
Can be seen on this one for example: https://nomadsrtw.com/2018/06/14/zanzibar/
ThanksHi,
This is a custom template which re-elabotates the content.
If you want your plugin to work, you will loose the possibility to hide the videos from the content.Once you are aware of this, you cna replace in template-tutorial.php line 126 with
the_content();
where you seeecho wpautop (do_shortcode($content));
Hi there,
I have been trying many things and the TOC is still one of the main issues I am having.
I tried to do what you suggested up there, but TOC will never show on any post with the video format even by doing that. I even tried the shortcode [toc] which should work, but again, never with video format posts.
This post is an example where I want and should appear but is not there:
https://nomadsrtw.com/zanzibar-guide-an-epic-journey-through-a-dreamy-island/In any other post where the format is standard, the TOC will show up automatically with no issue.
I have really some large posts, and not having the option of including table of contents is a big issue. Can you please provide any other option as a work around?
Thanks
Regards
Hi Nomad and thanks for your feedback.
The code customization offered by my collegue Andrea has to be applied probably to other templates. He is explaining it for the tutorial template, but in the theme folder you will find 3 template-[…].php files.You probably need to perform the customization on another template like the video or the default one.
Thanks, so for example in template-video.php.
I got this
echo wpautop (do_shortcode($content));
} else {
the_content();
in line 77. Should I removed line 77 and 78? I guess here replace line by the_content(); does not make sense.Will wait for your instructions since I dont want to mess up with codes until I am sure what i am doing
Hello and thanks for getting back, you can remove all this
and leave only
<?php the_content(); ?>
- This reply was modified 6 years, 4 months ago by themes2go.
Thanks for the help.
I did exactly that, and what happened is a http error 505 in all pages where there is a video.
Is there maybe any easy work around to create a TOC on top of the page, or this code will always prevent TOC from show up whenever there is a video?
I tried inserting shortcode [toc], but again, in video format I am struggling to make it appears.
Hi, any help on this?
I understand there are lots of queries and I know I do ask a lot, but this is taking us lot of time to solve and the quality of long posts are affected by this.
I am open to any suggestion you may have, is only I’d love to take advantage of the video in headers of the theme, having an option to include TOC somehow
Thank you
Regards
Hello, it seemssome code change you did was not correct.
If you have a screenshot of your actual file I can tell you something more, otherwise is very hard to understand what happened.The provided instructions, if correctly implemented, don’t lead to 500 errors.
I have otherwise an alternative suggestion: we used ourselves in other sites some TOC plugins.
I found out there are many, and some of the allows to add the TOC via shortcode, instead of automatically putting it in the content.If you put it via shortcode, it will work out of the box without any code customization.
I don’t remember if I used exactly this, but it should work fine
https://wordpress.org/plugins/shortcode-toc/
as selector you should use .qt-the-content
This is another too, maybe sipler
https://wordpress.org/plugins/fx-toc/Ok,
So I got one now which is kind of working, but still seems to be an issue with the theme code somewhere.
I have tried all possible configurations from plug-in settings, but the TOC will appear always like cut, like here:
http://nomadsrtw.com/travel-around-the-world-all-you-need-to-know/Also, when I go to a post with a video and I insert [toc], the table of content will appear again cut, but in this case, the links of the TOC will not even work, which again, it does not matter which TOC i use with shortcode or not, it just simply won’t work properly on pages where I got videos.
So not sure how to go around this now
Regards
Hi. I see this item appearing correctly and working fine.
You can’t use it in Tutorial templates because there is already our own internal menu, which you can use following the manual. Is the Chapter functions 8added by the chapters menu) and it creates internal links in the dynamic sidebar of the tutorial template.Alright. for tutorials, I get that you can use chapters instead, that is ok.
The issue here is, for any post that is not necessarily in video post format, the TOC (regardless which TOC plug-in you have, with shortcode or no shortcode) will not work.Which means, I don’t have a tutorial, I just have a post with a video in the header, and if I choose that, I cannot choose to have a TOC, is that right?
Take this post I have as an example:
https://nomadsrtw.com/explore-the-best-of-thailand-in-10-days/Is a long post, to which I cannot add TOC cause the code won’t allow it and a chapter summary does not make any sense here.
All I am saying, I wouldn’t like to lose the cool functionality of having my videos in the header simply because the code won’t let me generate a TOC for a post containing a video
If you disable from the customizer “hide first video”, it should fit your needs and display the TOC, but the video will appear again in the contents.
òOur theme option (hide first video when it appears in header) manipulates the content, but it has limitations (TOC not appearing) so you need to choose what is better for you, as both things can’t work together.Absolutely wonderful, that’s all I needed!
Thanks a lot 😀Glad this worked for you!:-)
I am going to close this ticket.Have a good one,
Andrea
The topic ‘TOC in post with video format’ is closed to new replies.