• 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

3details

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
  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • February 16, 2015 at 6:58 am in reply to: add text after post title #141012
    3details
    Member

    Brad, I said “I think” its your code because through searching I saw that your site has very similar examples (there is no author or copyright comment in my snippet…) Unless you can provide the url (which I can’t find) then I’m assuming I picked it up elsewhere, can you do that, just to clarify your accusation please?

    many thanks,
    Peter

    February 15, 2015 at 9:07 am in reply to: add text after post title #140927
    3details
    Member

    Thanks Genesis Developer, I tried this but it has not changed things
    this is the current state of the code in my custom_functions.php:

    add_filter( 'the_title', 'text_after_title_change_color' );
    function text_after_title_change_color( $title ) {
      global $post;
      
     
      if ( $post->post_title && in_category('11')) {
      return $title . '<span class="after-title"> - Sold</span>';
    
      } else {
       return $title . '';
      }
    }
    

    I changed if ( $title == $post->post_title && in_category('11')) { to if ( $post->post_title && in_category('11')) {
    because some posts in category 11 were not adding the Sold text to their titles

    Still have the same problem on the backend with raw html on the post titles

    February 15, 2015 at 8:26 am in reply to: add text after post title #140920
    3details
    Member

    I can't seem to find the page but its a variation on your code no? WPsites?
    I'm still looking....

    February 15, 2015 at 7:17 am in reply to: add text after post title #140915
    3details
    Member

    errr maybe I spoke to soon....
    This code works in my custom_functions.php however, it even applies the text on the end of post titles in the backed admin area
    Worse, it reverts to raw html, e.g. "post name <span class="after-title"> - Sold</span>"

    I would prefer to limit the output to archive views and single post views....

    February 15, 2015 at 7:07 am in reply to: posts grid on page #140914
    3details
    Member

    Hey thanks for this
    Using the visibility settings I am able to achieve what I was after
    much appreciated!

    Peter

    February 15, 2015 at 6:26 am in reply to: add text after post title #140904
    3details
    Member

    thanks for looking but I just solved it!:

    add_filter( 'the_title', 'text_after_title_change_color' );
    function text_after_title_change_color( $title ) {
      global $post;
      
     
      if ( $title == $post->post_title && in_category('11')) {
      return $title . '<span class="after-title">Sold</span>';
    
      } else {
       return $title . '<span class="after-title"></span>';
      }
    }
    
    
  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

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