• 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

Trying to override entry-title of listing page

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 › Trying to override entry-title of listing page

This topic is: not resolved

Tagged: entry-title, hook

  • This topic has 1 reply, 2 voices, and was last updated 11 years, 8 months ago by Sridhar Katakam.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • October 22, 2013 at 12:48 pm #68258
    cutcopypaste
    Member

    I have a custom page template that acts as a listing for custom post types. I want to have the title of the page be set indepentantly of the page editor (hardcoded), but the code is all hooks and custom loops etc, so I don't know where to do it. I tried this:

    remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
    add_action( 'genesis_entry_header', 'events_do_post_title' );
    
    function events_do_post_title($title){?>
    	<h1 class="entry-title" itemprop="headline">Upcoming Events</h1>
    	<?php
    }
    

    but it affects all the posts that are being looped to as well. How could I best inject this?

    October 22, 2013 at 11:20 pm #68359
    Sridhar Katakam
    Participant

    Here's a sample code to change title text of a particular static Page:

    add_filter( 'genesis_post_title_text', 'sk_genesis_post_title_text' );
    function sk_genesis_post_title_text( $title ) {
    	if( is_page('sample-page-2') ) {
    
    		$title = sprintf( 'This is the new title' );
    		return $title;
    
    	}
    }

    You could change the is_page condition to is_page_template. See http://codex.wordpress.org/Function_Reference/is_page_template


    Genesis Tutorials | Follow me on Twitter

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

© 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