0

I want to edit the html output of the CPT page. Searched a lot but didn't find a solution ... May be I'm searching it wrong or it not might have done by anyone yet.

enter image description here

In the screenshot above one can clearly see the title Contest which is a label when I registered this post type. Its generating in <h1> tag. Either I want to edit the output or add a new element (i.e. and image) above it.

1

You can add anything up there with the 'in_admin_header' action. Example (pseudo code):

add_action( 'in_admin_header', function() {
    if ( ... check $post_type, $pagenow etc, to target right page only ... ) {
        echo '<p>Hello editor</p>';
    }
} );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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