Removing Author Box and Author Name on CPT

Posted in: Newspaper
Post count: 11

Hi, I understand that under the theme panel settings, I can change to show the author name and author box for post and custom post type.

But I want do not want to show author name and author box for specific custom post type, please kindly advise how can I do so.

This is the URL that I do not want to show the author name and author box: http://www.lilkuya.com/event/trainers-training-for-managers-instructors/

Post count: 22421

Hello,

If this is just the front-end you are referring to, you can simply hide them with css like so:
.single-ai1ec_event .td-post-author-name, .single-ai1ec_event .author-box-wrap{
display:none!important;
}

If you want to remove them from the code you will have to add conditions in the thee files around the post author and the author box element.

Thank you!

Post count: 11

Noted. Thank you, Bogdan B. What kind of conditions will be required? Can you help me with a condition that if it is not post, then no author details?

Post count: 22421

Hello,

Here is an example of such a condition you can use to alter code for a specific post type: https://codex.wordpress.org/Function_Reference/is_post_type_archive
https://codex.wordpress.org/Post_Types

I hope this helps.

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.