Use "read more" function like an accordion

I would like to minimise the initial amount of visible information on a page and if someone has enjoyed the first paragraph and wants more they click the “read more” link at the end of that paragraph and on the same page just underneath paragraph 1 is paragraphs 2 & 3.

I’d like it to be like an accordion in function but I find that too boxy and would prefer it looks like a link instead. Is that even possible? I am sure I have seen it done on other sites but just can’t find any of them right now to be able to show it as an example.

When I have used this:

<!--more-->

it has not resulted in any effect that I could see on the front end.

I hope my explanation makes sense

Hello Richard,

Thanks for writing in!

The “read more” in the excerpts found in the blog index or archive pages links to the actual blog post items by default. There is no feature that it acts like an accordion and displays further information.

Meanwhile, with a quicktag the post author decides what happens, whereas the template writer is in control with excerpts. Moreover, although can be used to create a real split using the $stripteaser parameter, it would be hard and complicated to then differentiate based on characteristics, causing this to become a basically site-wide choice. This does not take effect in the blog index or archive pages because we uses the_excerpt() function in the theme.

Hope this helps.

Thanks for your reply

You are most welcome. :slight_smile:

I did find a solution using the accordion feature in case anyone else is looking to solve the same issue. I stripped out the border and shadow, the indicator triangle on the left and the line when the accorion is opened. In this way I can have minimal text displayed without the ugly accordion box showing but still have the functionality I was looking for

We are just glad that you have figured it out a way to correct the said issue.
Thanks for letting us know!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.