• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Creating a read more/hide text toggle

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Creating a read more/hide text toggle

This topic is: resolved

Tagged: read more tag

  • This topic has 2 replies, 2 voices, and was last updated 8 years, 1 month ago by Helene25.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • September 24, 2017 at 11:32 pm #211832
    Helene25
    Member

    I've been trying to figure out how to create a toggle (and please forgive me if I'm using incorrect jargon) so that readers can see the first paragraph or so of text and then if they want to read on, they hit a "read more" toggle button that will open the rest of the text on that page. They can also hit the same button to hide the text, if they don't want to see it on the page, although that's not as important as the read more bit.

    I know there's a "read more" button on the page editor, so maybe it's just that I don't know how to use it properly.

    I've installed the Collapse-O-Matic plugin, but it's too technical for me, so I'm thinking of uninstalling it.

    I'd like to put the read more toggle button/arrow/text after where I've said "hit the button below..." I'm still editing the content of this page, and it'll be influenced by whether I can do this button thing or not 😉

    Appreciate any help you can offer.
    Helene

    http://www.musicallyspeakingvic.com.au/your-hands/
    September 25, 2017 at 1:06 am #211833
    William
    Member
    jQuery(function( $ ){
    
    	var question = $('.faq .question');
    	var answer = $('.faq div');
    	 
    	$( answer ).hide();
    	 
    	$( question ).click( function() {
    	 
    		$(this).find('span').toggleClass( "open" );
    		$(this).next().slideToggle(200);
    	 
    	 
    	});
    
    });

    With the following HTML:

    <div class="faq">
    <p class="question">Heading Goes Here <span class="open"></span></p>
    <div style="display: none;">Content goes here...</div>
    </div>

    Something among those lines 🙂

    There are quite a few examples on Stackoverflow as well:
    https://stackoverflow.com/questions/25341429/jquery-read-more-read-less-how-to-replace-text


    Genesis Customization Service | Quick fixes whenever you need them ! | Contact me at Fixmysite.com !

    September 25, 2017 at 1:23 am #211834
    Helene25
    Member

    Thanks so much William. Unfortunately I don't know where to put all this code. Does it go on the page itself?

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble