• 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

Displaying text with MORE tag?

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 › Displaying text with MORE tag?

This topic is: not resolved

Tagged: functions, more, php, tag

  • This topic has 8 replies, 4 voices, and was last updated 8 years, 6 months ago by Marcy.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • January 30, 2014 at 6:57 am #87801
    komanderkin
    Member

    I'm trying to make the more tag output some text on the place where it's inserted in the post.

    i was suggested to use the following code in functions.php:

    add_filter( 'the_content_more_link', 'read_more_text' );
    function read_more_text() {
    if ( is_single() ) {
    echo '<div class="your-banner">ADD TEXT HERE</div>';
        }
    }

    unfortunately, it doesn't output anything on the post.

    i've searched all around the web for a solution, but couldn't find a way to fix the code provided above. any ideas on how to do this in Genesis?

    99sounds.org

    http://99sounds.org
    January 30, 2014 at 11:45 am #87841
    Marcy
    Participant

    You need to look at the code snippets on this page of studiopress.com
    http://my.studiopress.com/snippets/post-excerpts#content-more-link

    Since you're inserting the More link into your full content, you would use this one

    //* Modify the WordPress read more link
    add_filter( 'the_content_more_link', 'sp_read_more_link' );
    function sp_read_more_link() {
    return '<a class="more-link" href="' . get_permalink() . '">[Continue Reading]</a>';
    }

    You would replace [Continue Reading] with the text that you want.


    Marcy | Amethyst Website Design | Twitter

    January 30, 2014 at 12:15 pm #87849
    komanderkin
    Member

    Hi Marcy, thanks for the reply!

    I've tried your code but it still doesn't do anything (or at least not what I want it to do.

    Here's what I want to happen. Let's say that this is the HTML snippet of my post:

    some text
    <!--more-->
    some text

    i want it to look like this on the page:

    some text
    MY TEXT WHICH IS ADDED TO THE MORE TAG
    some text

    I've been getting similar suggestions as the one you've posted above, but it seems that something is missing in that code.

    November 4, 2014 at 10:16 pm #130518
    jdaviescoates
    Member

    I have the same problem. It seems that in Genesis you can only choose from 2 sub-optimal options:

    1. in Genesis Theme Settings -> Content Archives choose Display Post Content and choose some arbitrary content limit. A ...[Read More...] link is displayed. Great! But sub-optimal because you can't use the More Tag within posts to choose exactly where you want that link to appear.

    2. in Genesis Theme Settings -> Content Archives choose Display Post Excerpt. This respects the More Tag in posts and cuts off posts there. Great! But no ...[Read More...] link is displayed and so this option is also sub-optimal.

    Is there really no way to be able to choose exactly where you want the ...[Read More...] link to be displayed in Genesis?!?

    All I want is to be able to insert the More Tag in a post and for the blog page and content archives to display a ...[Read More...] link at that point. This must be possible, no?

    November 4, 2014 at 10:27 pm #130521
    Genesis Developer
    Member

    try this once

    add_filter('get_the_content_more_link', 'custom_read_more_link');
    function custom_read_more_link(){
        return '... <a class="button readmore" rel="nofollow" href="' . get_permalink() . '">Continue Reading...</a>';
     }

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

    November 4, 2014 at 10:39 pm #130525
    jdaviescoates
    Member

    Thanks for trying to help Genwrock, but that doesn't make any difference.

    All your code does is change the default …[Read More...] link into a button and change the words to Continue Reading.

    My points 1 & 2 above still hold true; that is either I can have a …[Read More...] link displayed after a given number of characters (by choosing Display Post Content and setting the character limit), or I can choose where I want the break to be post by post (by choose Display Post Excerpt) but then no …[Read More...] link link is displayed at all.

    I want to be able to choose where to break posts and have a …[Read More...] link displayed.

    November 4, 2014 at 11:07 pm #130537
    Marcy
    Participant

    I do what I think you want to do on my blog. I add <!-- more --> where I want in my post, and the Read more appears in the blog at that point.

    These are my Genesis settings:
    Content Archives:
    Select one of the following: Display post content
    Limit content to characters: 0

    Try it with no character limit and Display post content.


    Marcy | Amethyst Website Design | Twitter

    November 4, 2014 at 11:28 pm #130538
    jdaviescoates
    Member

    Marcy, I love you!

    I knew it must be possible!

    Thanks!

    November 5, 2014 at 10:01 am #130602
    Marcy
    Participant

    LOL! Glad it helped.


    Marcy | Amethyst Website Design | Twitter

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