Stephanie Leary

Writer and WordPress consultant

  • Books
    • Content Strategy for WordPress (2015)
    • WordPress for Web Developers (2013)
    • Beginning WordPress 3 (2010)
  • Blog
    • Fascism Watch (2016-17)
    • Content Modeling for WordPress series
    • WordPress Hidden Gems series
  • Work
    • Portfolio
    • Services
    • WordPress Plugins
    • WordPress Themes
    • Presentations and Interviews
    • on GitHub →
  • About
    • Press Kit
  • Contact
    • Mailing List

WordPress Hidden Gem: enter_title_here filter

June 21, 2016 Stephanie Leary 2 Comments

When you’re working with custom post types, sometimes the post title isn’t a title. It might be a person’s name, a building number, or a course code (just to take a few examples from universities). So it’s great that WordPress has a simple filter that makes it easy to customize the “Enter title here” placeholder text to make it fit your content:

https://gist.github.com/sillybean/e7d54addfa36428cfc3ce61ab171a4a7

WordPress content modeling, content strategy, microtext

Comments

  1. Mike Steffel says

    November 3, 2016 at 12:54 pm

    Stephanie,

    Would it be best practice to have this function in the plugin for your custom post type? Currently we are using several plugins for different items and though it may be handy to have this function in the theme functions file, I’m guessing it is better to have this function reside in each plugin.

    As an example, we are developing a news site with the following plugins and content types:
    – alerts plugin (campus alerts)
    – news plugin (news articles, and press releases)
    – spotlights (using the same “spotlight” content type for students, faculty/staff, and employers)

    If the function should be in the plugin, we could combine these separate plugins into one where we could use this function once instead of three times. However, we are planning on using the news plugin on other sites, and it would be nice to have the plugin consistent.

    Thoughts?

    Reply
    • Stephanie Leary says

      November 7, 2016 at 10:22 am

      Hey, Mike. In that situation, I’d use separate filters in each plugin, and maybe replace the switch() with a simple if().

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Fascism Watch

The Fascism Watch is a daily(ish) news roundup. View all the previous Fascism Watch posts »

Latest WordPress Book

Content Strategy for WordPress

A short book for content strategists and managers on implementing a complete content strategy in WordPress: evaluation, analysis, content modeling, editing and workflows, and long-term planning and maintenance.

Read the sample chapter

Kindle Nook iBooks Kobo Smashwords

WordPress for Web Developers

WordPress for Web Developers (9781430258667)

This is a book for professional web designers and developers who already know HTML and CSS, and want to learn to build sites with WordPress. The book begins with a detailed tour of the administration screens and settings, then digs into server-side topics like performance and security. The second half of the book is devoted to development: learning to build WordPress themes and plugins.

This is the second, much-revised and updated edition of Beginning WordPress 3, with a more accurate title. Everything’s been updated for WordPress 3.6.

WordPress for Web Developers is out now. See what's inside...

The best WordPress features you’ve never noticed

  • WordPress Hidden Gems: Screen Options
  • WordPress Hidden Gems: Bulk Edit
  • WordPress Hidden Gems: Private Status
  • WordPress Hidden Gems: Dashboard Feed Readers
  • WordPress Hidden Gems: Options.php

Content Modeling for WordPress series

  • Content modeling for WordPress, part 1: analyze content
  • Content modeling for WordPress, part 2: functional and organizational requirements
  • Content modeling for WordPress, part 3: a sample content model

This is an excerpt from Content Strategy for WordPress.My latest books are Content Strategy for WordPress (2015) and WordPress for Web Developers (2013). Sign up to be notified when I have a new book for you.

Copyright © 2021 Stephanie Leary