• 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

Customize "continue reading" link on specific pages

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 › Customize "continue reading" link on specific pages

This topic is: resolved

Tagged: continue reading

  • This topic has 7 replies, 2 voices, and was last updated 8 years, 11 months ago by bionary.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • August 5, 2016 at 6:46 am #190771
    bionary
    Member

    Hello,

    I know you can change the "continue reading" button globally. I am, however looking to do it only on a specific category page. For instance when a user goes to: http://mysite.com/category/videos/ I would like the buttons to say "watch video". Can this be done and hopefully without a plugin?

    Thanks!

    August 5, 2016 at 7:34 am #190772
    Genesis Developer
    Member

    Try this code once. You will add it in your functions.php file

    add_filter( 'get_the_content_more_link', 'gd_customize_more_link_text' );
    add_filter( 'excerpt_more', 'gd_customize_more_link_text' );
    function gd_customize_more_link_text( $more_link ) {
      if( ! is_category( 'videos' ) )
        return $more_link;
        
      $new_more_link = sprintf( '… <a href="%s" class="more-link">%s</a>', get_permalink(), genesis_a11y_more_link( __( 'watch video', 'themeprefix' ) ) );
      return $new_more_link;
      
    }

    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    August 5, 2016 at 8:14 am #190774
    bionary
    Member

    Thank you for your efforts but it did not work.
    I tried both:
    if( ! is_category( 'Videos' ) )
    and
    if( ! is_category( 'videos' ) )

    thinking maybe there could be a difference as one is the category title and the other is the slug...but neither one worked I'm afraid.

    August 5, 2016 at 8:25 am #190775
    Genesis Developer
    Member

    Then use the category ID. Assuming your category ID is 20 then you will use

    ! is_category( 20 )


    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    August 5, 2016 at 8:33 am #190778
    bionary
    Member

    nope, actually digging into the function.php file I see I already have:
    //* Modify the WordPress read more link
    add_filter( 'the_content_more_link', 'beautiful_read_more' );
    function beautiful_read_more() {
    return '' . __( 'Continue Reading', 'beautiful' ) . '';
    }

    //* Modify the content limit read more link
    add_action( 'genesis_before_loop', 'beautiful_more' );
    function beautiful_more() {
    
    	add_filter( 'get_the_content_more_link', 'beautiful_read_more' );
    
    }
    
    add_action( 'genesis_after_loop', 'beautiful_remove_more' );
    function beautiful_remove_more() {
    
    	remove_filter( 'get_the_content_more_link', 'beautiful_read_more' );
    
    }

    so i think there's a conflict occurring

    August 5, 2016 at 8:40 am #190779
    Genesis Developer
    Member

    Ahhh... do not use my code

    Try this

    add_filter( 'the_content_more_link', 'beautiful_read_more' );
    function beautiful_read_more() {
      if( ! is_category( 'videos' ) )
        return __( 'Continue Reading', 'beautiful' );
        
      return __( 'watch video', 'beautiful' );
    }

    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    August 5, 2016 at 8:46 am #190780
    bionary
    Member

    did so, with three variants: "videos" "Videos", 18 ... video page comes back with no links

    August 5, 2016 at 9:14 am #190781
    bionary
    Member

    no, I'm a bozo. your code was working....I just didn't see the 'watch video' only because it wasn't a link...it was simply appended to the end of the text. Here's my final working code:

    add_filter( 'the_content_more_link', 'beautiful_read_more' );
    function beautiful_read_more() {
    	if(is_category('videos')){
    		return '<a class="more-link" href="' . get_permalink() . '">' . __( 'Watch Video', 'beautiful' ) . '</a>'; 
    	}else{
    		return '<a class="more-link" href="' . get_permalink() . '">' . __( 'Continue Reading', 'beautiful' ) . '</a>'; 
    	}
    }

    Thanks, as i couldn't have done this without your speed help!

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 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