WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been playing with custom post types & custom fields, using a combination of the types plugin and the advanced custom fields plugin, also having done the same manually.

Occasionally I want to create a CPT where a title would be inappropriate - for example, an FAQ where I want two fields labelled Question and Answer. This does work without a title, however they all get saved as (No Title).

What I'd like to do is either set the title to the value of the Question custom field, or somehow define my own title field that I can label as I like.

Does anyone have any pointers on how to acheive this?

share|improve this question
Why not use the title rather than the question field for the actual question? – Stephen Harris May 11 '12 at 10:31
@StephenHarris because I can't label the title field as a 'Question', it would be unclear to the user what to do. As I mentioned in the question, if anyone can tell me how to relabel that then that's what I would use – jammypeach May 11 '12 at 10:36
up vote 1 down vote accepted

You can use the enter_title_here filter:

    function wpse51871_alter_title_label($label, $post){
        if( 'question' == get_post_type($post) )
            $label = __('enter question here', 'my-plugin-text-domain');

        return $label;
share|improve this answer
that's prefect, thanks! one other solution I was playing with was a bit of javascript to hide the title & update the value but this is much more elegant. thanks for sharing :) – jammypeach May 11 '12 at 12:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.