• 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

Change Continue Reading text to css button / image

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 › Change Continue Reading text to css button / image

This topic is: not resolved

Tagged: button, continue reading, read more, text to image

  • This topic has 3 replies, 2 voices, and was last updated 9 years, 12 months ago by Hard Boiled Greg.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • February 5, 2013 at 7:56 am #18194
    francky
    Member

    I am using Metro Theme and would want to replace the  [Continue Reading] to a CSS BUTTON or IMAGE.

    How can I do this? I have searched the forums but couldn't find the solution.

    Thank you in advance.

    February 5, 2013 at 1:59 pm #18291
    Hard Boiled Greg
    Member

    Hi,

    You can add this code to your functions.php file:

    /** Modify the Genesis content limit read more link */
    add_filter( 'get_the_content_more_link', 'custom_read_more_link' );
    function custom_read_more_link() {
        return '... <a class="more-link" href="' . get_permalink() . '"><img src="image-link-here"></a>';
    }

    adding the location of your button image to the img src=

    Also the link has a class of "more-link" so your could style it's background with a CSS gradient for a button effect instead.

    Hard Boiled Greg


    Website: Hard Boiled Greg Twitter: @hbgreg

    February 6, 2013 at 1:42 am #18394
    francky
    Member

    Thank you Greg!

    Unfortunately that code was bringing some errors and I was lucky enough to get the following code which worked fine.

    <code>

    /** Modify the Genesis content limit read more link */
    add_filter( 'excerpt_more', 'child_read_more_link' );
    add_filter( 'get_the_content_more_link', 'child_read_more_link' );
    add_filter( 'the_content_more_link', 'child_read_more_link' );
    function child_read_more_link() {
    return '...<a class="more-link" href="' . get_permalink() . '"><img src="image-link-here"></a>';
    }

    </code>

    February 6, 2013 at 1:50 am #18395
    Hard Boiled Greg
    Member

    I tested it before I posted it, but I'm glad you got it resolved.

    Take care,

    Greg


    Website: Hard Boiled Greg Twitter: @hbgreg

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