• 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

Open Read More in a new tab News Pro Theme

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 › Open Read More in a new tab News Pro Theme

This topic is: resolved

Tagged: new tab, News Pro, read more

  • This topic has 28 replies, 2 voices, and was last updated 10 years, 5 months ago by Erik D. Slater.
Viewing 9 posts - 21 through 29 (of 29 total)
← 1 2
  • Author
    Posts
  • June 12, 2015 at 1:13 pm #156003
    CDM
    Member

    I understand bout the dynamically realated files warning. But it's the syntax error that has me stumped

    Thanks

    I really appreciate your time

    CD

    June 12, 2015 at 1:36 pm #156005
    Erik D. Slater
    Member

    By all means, send me your functions.php file to [email protected] and I can take a little looksy.

    You may want to start Googling for a solution to that error message though ... since the code I provided doesn't do anything complex or file-related ... it simply returns a line of text a-la HTML 🙂


    Erik D. Slater: Digital Platform Consultant • LinkedIn
    June 12, 2015 at 1:53 pm #156009
    CDM
    Member

    Wow.. This time when I pasted it from your original I didn't get an error message!!! Okay.. I'm going to try it again.. with "Read more..."

    add_filter('excerpt_more', 'eds_excerpt_more', 10, 1);
    function eds_excerpt_more($more) {
    return 'Read more...';
    }

    June 12, 2015 at 3:10 pm #156014
    Erik D. Slater
    Member

    Well, I can tell you that the problem you had was likely related to Dreamweaver ... since the file you sent me looks absolutely fine 🙂

    When testing the code, don't forget to set the Content Type to Show Excerpt.


    Erik D. Slater: Digital Platform Consultant • LinkedIn
    June 12, 2015 at 10:36 pm #156053
    Erik D. Slater
    Member

    Sooo ... it turns out you're actually using the Genesis - Featured Page widget ... not the Genesis - Featured Posts widget!! Oh yes ... it makes a difference 🙂

    The best solution I have for you there is the following:

    add_filter('the_content_limit', 'eds_the_content_limit', 10, 1);
    function eds_the_content_limit($content) {
    	return str_replace('class="more-link"', 'class="more-link" target="_blank"', $content);
    }

    I'm not sure I like this solution because it will be applied to all cases where you choose to display content with a content limit, i.e. the Featured Posts and Featured Page widgets, as well as the regular blog listing.

    But ... it definitely works 🙂


    Erik D. Slater: Digital Platform Consultant • LinkedIn
    June 12, 2015 at 10:59 pm #156055
    Erik D. Slater
    Member

    Now ... on a more design-centric philosophical note - which I deliberately ignored here because I like to try to solve the problem in hand without questioning an OP's intentions - I generally advise against the forcing of opening same-site links in a new tab or window. Clearly, the Genesis widgets were written in such a way that they don't facilitate the feature at all ... and there is a good reason for that.

    As mobile usage outstrips desktop, a user's experience may be affected as they go through multiple pages on a single site. If a new window is forced upon them in their browser app, it could lead to some performance and usability issues. On desktop though, it is generally annoying when pages within the same website don't open in the same tab/window ... unless the user chooses to do so.

    The general rule with any website is to make that emotional connection with your visitors. Nobody cares about the life or journey of an author unless there is some kind of empathy. Priority should always be given to the user journey.

    For external links, I personally have no issues with forcing the opening of a new tab/window ... since it is a different website ... and responsibility passes to the new location. But for internal links - despite my contributions here - I think this entire thread is moot 🙂


    Erik D. Slater: Digital Platform Consultant • LinkedIn
    June 13, 2015 at 10:38 am #156100
    CDM
    Member

    Ah... excellent point!!! about the mobility issues. I hadn't thought about that.. Thanks so much for your help and time Erik.

    CD

    June 13, 2015 at 11:58 am #156108
    CDM
    Member

    IT WORKS!!!!! Yay!!!! Thanks so very much.. I tested it on my dev site after I found it worked on my scrap site. I'll send you an email with the link

    CD

    June 13, 2015 at 12:52 pm #156118
    Erik D. Slater
    Member

    You're very welcome 🙂


    Erik D. Slater: Digital Platform Consultant • LinkedIn
  • Author
    Posts
Viewing 9 posts - 21 through 29 (of 29 total)
← 1 2
  • 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

© 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