I have always had a habit of writing "long articles". At the beginning, I wrote blogs like I was writing messages. The articles were short, but I still found it difficult to write and couldn’t find the right sentences to express them. Later, I came up with a "lazy idea" - adding a lot of pictures to the article. Firstly, it can increase the content of the article. Secondly, the article that combines pictures and text will be more interesting to read.
However, articles that combine pictures and text are generally relatively long. Sometimes the web page has to be scrolled to the bottom to fully read an article, which is very inconvenient. I also heard that article directories are good for SEO (PS: In fact, you can often see article directory links in search results), so I created an article directory for digging sites, which is automatically inserted and looks very pleasing to the eye.
In order to maximize the use of the article directory, we can also fix the article directory in the sidebar and scroll as the web page is pulled down. Readers can return to the content they care about at any time. The user experience is very good. Some common development documents are Such. This article will share how to set a fixed and scrolling article directory for the sidebar in WordPress.
For more articles about WordPress website building and website construction, please check out:
- The WordPress plug-ins I am using - WP SEO, CDN, caching, pictures, emails, forum plug-ins
- Website optimization acceleration-turn on TLSV1.3 and Brotli compression-Oneinstack, LNMP, Pagoda panel
- Improve website search - Baidu, Google custom search and Elasticsearch self-built search
PS: Updated on November 3, 2019, If the WordPress server has enough memory, it can cache the page into the memory for acceleration. Reference: Use the Cachify plug-in to cache the WordPress page into Memcached for optimization and acceleration.
PS: Updated on December 2, 2019, If you use a lot of WordPress plug-ins, various conflicts and problems may easily occur. The detection methods are: WordPress error diagnosis mode - specializes in treating blank WP pages and server 500 errors. Plug-in conflict.
1. Use plug-ins to automatically insert article directories
If friends with coding skills can use the code, in line with the principle of using less plug-ins if you can use the code, it will help speed up the running speed of WordPress. Here are two plug-ins that automatically insert table of contents into WordPress articles.
1.1 Easy Table of Contents
Plugin:
- Website: https://wordpress.org/plugins/easy-table-of-contents/
Main features of Easy Table of Contents plug-in:
1. Automatically insert a table of contents into WordPress articles, and also support manual insertion of a table of contents at any location.
2. Contains multiple styles, you can choose whether to display numbers or symbols, etc.
3. Supports whether to display layering, supports gadgets, and can set exceptions.
After activating the Easy Table of Contents plug-in, you can choose whether to enable the article directory on a certain page. (Click to enlarge)
Then, you can set the directory location, whether to be hierarchical, whether to include serial numbers, smooth scrolling, etc. (Click to enlarge )
The effect of the Easy Table of Contents article directory is as follows:
1.2 LuckyWP Table of Contents
Plugin:
- Website: https://wordpress.org/plugins/luckywp-table-of-contents/
The functions of the LuckyWP Table of Contents plug-in and Easy Table of Contents are very similar, and the settings of the two are similar, including appearance, position, layering, smooth scrolling, etc. (Click to enlarge)
Both plugins support custom CSS, which you can choose based on your WordPress theme.
The effect of the LuckyWP Table of Contents plug-in is as follows:
2. Fixed drop-down scrolling on the side of the article directory
2.1 Add gadgets
Open the WordPress widget and add the Easy Table of Contents and LuckyWP Table of Contents widgets.
2.2 Fixed sidebar
Some WordPress themes come with sidebar fixed and drop-down scrolling, so you only need to add widgets to the sidebar to achieve this effect. If it is not supported individually, you can download the plug-in: Q2W3 Fixed Widget for WordPress
- HTTPS://WordPress.org/plugins/please2i3-fixed-widget/
The effect of Q2W3 Fixed Widget for WordPress fixed sidebar is as follows:
2.3 Fixed effect demonstration
According to the above method, we can see that the WordPress article directory is fixed in the sidebar, and when the page is pulled down, the prompt will automatically scroll. The effect of the wzfou.com test is as follows:
3. Summary
Adding an article directory to WordPress is more suitable for long articles or articles that combine pictures and text. Firstly, it is convenient for readers to read, and secondly, it is beneficial to SEO. The two plug-ins, Easy Table and LuckyWP Table, have similar functions, and both support custom CSS and have good effects.
Q2W3 Fixed Widget for WordPress is a very powerful plug-in. It can make any sidebar fixed and scrollable. If you find that it has no effect, check if there is any JS conflict. It is best to use Chrome to inspect the element.