I've created a CPT in my WordPress site. In this CPT I have the content element (which is the default WP content) and want to make it expandable, I mean, while viewing the CPT I want it to only display a few lines of text until you press the view full content or something similar, all this inside the post view. Like in the image below:
2 Answers
There might be two reasons for your problem
- You are using
<!--more-->
tag inside your content . If so then remove it. - While querying post you are using
the_excerpt
method , if so then change it tothe_content
.
-
Sorry, I didn't explained very well my question. I am trying to put the see more inside the post. Commented Jul 3, 2015 at 9:54
I solved it using the following WordPress Plugin, which has plenty of options to customize: https://wordpress.org/plugins/jquery-collapse-o-matic/