• 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

Problem with changing default [Read more] button.

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 › Design Tips and Tricks › Problem with changing default [Read more] button.

This topic is: resolved

Tagged: code missing, Metro theme., read more button

  • This topic has 6 replies, 2 voices, and was last updated 8 years, 11 months ago by abssquad.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • April 14, 2014 at 1:59 pm #100268
    abssquad
    Member

    Hey,

    I have trouble finding the code, that is giving me the default Read more button, when making text brake in my blog.

    I want to customize my default [Read More] button to a simple blue link, without brackets.

    Im using Metro pro theme running on genesis. Looked everywhere but I didn't managed to find the specific code.

    Anyone has ideas, what shall I do?

    http://abssquad.com
    April 14, 2014 at 5:49 pm #100314
    nutsandbolts
    Member

    Try adding this to functions.php (customize the last line with whatever you'd like your "read more" link to say):

    // Customize Read More text
    add_filter( 'excerpt_more', 'nabm_more_link' );
    add_filter( 'get_the_content_more_link', 'nabm_more_link' );
    add_filter( 'the_content_more_link', 'nabm_more_link' );
    function nabm_more_link() {
    return '<a href="' . get_permalink() . '" rel="nofollow">Continue Reading...</a>';
    }

    You could also give it a div class to make it easier to style.


    Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

    April 15, 2014 at 2:53 am #100364
    abssquad
    Member

    Awesome job Andrea!! Thanks a lot.

    There is still this one thing I was wondering about, that how can I change the colour of the continue reading link, right now it is black but I would like a certain blue tone for it, and is it possible to remove the line under it as well?

    April 15, 2014 at 10:38 am #100502
    nutsandbolts
    Member

    I usually give my link a div class, like this:

    // Customize Read More text
    add_filter( 'excerpt_more', 'nabm_more_link' );
    add_filter( 'get_the_content_more_link', 'nabm_more_link' );
    add_filter( 'the_content_more_link', 'nabm_more_link' );
    function nabm_more_link() {
    return '<a href="' . get_permalink() . '" rel="nofollow"><div class="morelink"Continue Reading...</div></a>';
    }

    That way in my stylesheet I can do things like this:

    .morelink {
    color: blue;
    text-decoration: none;
    }
    
    .morelink:hover {
    color: #000;
    }

    Or whatever styling works best for your situation. Hopefully that makes sense.


    Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

    April 15, 2014 at 12:46 pm #100553
    abssquad
    Member

    Im afraid there is a mistake in the last code, because the continue reading link will dissapear when I change the first code to second you gave me.

    Since Im not very familiar with css I cant figure out what is the problem there.

    Sorry for the trouble, hope you can help me with that.

    April 19, 2014 at 8:50 am #101274
    nutsandbolts
    Member

    Sorry about that - you're correct, there's an error there. Try this one:

    // Customize Read More text
    add_filter( 'excerpt_more', 'nabm_more_link' );
    add_filter( 'get_the_content_more_link', 'nabm_more_link' );
    add_filter( 'the_content_more_link', 'nabm_more_link' );
    function nabm_more_link() {
    return '<div class="morelink"><a href="' . get_permalink() . '" rel="nofollow">Continue Reading...</a></div>';
    }

    Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

    April 22, 2014 at 3:27 am #101819
    abssquad
    Member

    Thanks a lot Andrea, that solved the problem.

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Design Tips and Tricks’ 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

© 2023 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