• 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

Best way to truncate titles 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 › General Discussion › Best way to truncate titles News Pro Theme

This topic is: not resolved

Tagged: entry-title, title truncate

  • This topic has 1 reply, 1 voice, and was last updated 10 years, 7 months ago by CJWheels.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • April 28, 2015 at 10:39 am #149421
    CJWheels
    Member

    Working here: http://celebrouhaha.com/

    Client wants the two rows of middle boxes to be completely even (meaning the titles line up regardless of how long they are). Initially, I put a:

    // Limit Post Title
    function titlelimitchar($title){
    if(strlen($title) > 21 && !(is_single()) && !(is_page())){
    $title = substr($title,0,21) . "..";
    }
    return $title;
    }
    add_filter( 'the_title', 'titlelimitchar' );

    in the front-page.php, but that truncated all titles on the home page, which they don't want. Is there a way to truncate titles in just the home middle section while leaving the home top and home bottom alone?

    I'm not finding it.

    Cynthia

    http://celebrouhaha.com/
    April 29, 2015 at 11:21 am #149522
    CJWheels
    Member

    Well, I kind of rigged it to work. For the home-middle sections, I added this:

    .home-middle .featured-content .entry-title {
    height: 25px;
    overflow: hidden;
    }

    Not sure if it's the right way to do it, but it got me where I needed to be. Curious to hear if anyone else would do it differently.

    C

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