R
R
rundll322021-06-06 06:13:47
WordPress
rundll32, 2021-06-06 06:13:47

How to automatically hide long posts under the spoiler?

This means that the entry appears on the page as a whole, not as a quote, but most of the content will be hidden by the "expand" button, as in many sites. I googled for a long time, but I didn’t find anything about “automatically”.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladislav Chernenko, 2021-06-06
@vladchv

There is no magic button, you need to write in js, or look for ready-made solutions. For example: ReadMore.js (exemple)
Well, or still display a part of the text, and on a click on the button pull it out with ajax.

A
Alex, 2021-06-06
@Kozack

This is implemented at the level of your theme. There are functions that display both a quote and full content, and depending on the site settings. Hiding under the spoiler is easy - use <details>.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question