How do i create a Show/Hide script after the first paragraph of a text? The idea goes for the_content
, where after the first paragraph hide the remaining text with an icon (arrow) and close to reveal the text.
-
1What you are asking is a pure Javascript/jQuery question and is not specific to WordPress at all. As such, the question is off-topic here.– s_ha_dumApr 16, 2015 at 17:28
Add a comment
|
1 Answer
Use both the_excerpt()
and the_content()
. Keep the_content()
hidden, and after the_exceprt()
add your Icon.
When someone clicks this Icon, toggle between the_excerpt()
and the_content()
.