Emailing Authors only when a CUSTOM POST TYPE post is published- not when edited later [duplicate]

Yes, it sounds like you do want a post transition hook, probably draft_to_publish as per the following from the Codex: function your_callback( $post ) { // Code here } add_action( ‘draft_to_publish’, ‘your_callback’ ); Use authorNotification— your function name– instead of your_callback. It should be fairly simple in your case. However, the precise details of your … Read more

remove author and date from all posts [closed]

For those who have the same issue, I solved it by doing the following: Within Apparence -> Customize -> Blog Post Options -> uncheck “post Date” uncheck “post Author” These settings, removed the author and date from the post. Then, commenting the following line from single.php /*$cmsms_post_author_box = get_post_meta(get_the_ID(), ‘cmsms_post_author_box’, true);*/ And then, I’ve changed … Read more

Replace author with custom field in feed

try this: add_filter( ‘the_author’, ‘feed_author’ ); function feed_author($name) { if( is_feed() && !is_admin()) { global $post; $author = get_the_terms($post->ID,’article_author’); if ( $author ) $name = the_terms($post->ID,’article_author’,”,’ & ‘); return $name; } }

wordpress user profile page

Create a file called author.php and place the code below in it. Save that file in your themes folder. The themes folder is located at yoursite.com/wp-content/themes/themename <?php include_once(‘header.php’); ?> <div id=”container”> <div class=”content”> <?php $curauth = (isset($_GET[‘author_name’])) ? get_user_by(‘slug’, $author_name) : get_userdata(intval($author)); ?> <div id=”author-contact-info”> <h2>Information about: <?php echo $curauth->nickname; ?></h2> <ul> <li>First Name: <?php … Read more

How can i hide the authors box from a specific set of categories and post types?

This depends on your theme. If it has no option for this, you’ll have to do this yourself. Find the template where the author box is generated (presumably single.php) and copy it to a child theme. Then make the production of the box conditional to the current category; if (!is_category (array (‘exclude-this-category, another-category-to-exclude’)) { echo … Read more

Uncode theme, create author page and author link under the blog

before making edits, please consider to create a child theme for your customization; https://developer.wordpress.org/themes/advanced-topics/child-themes/ to show a link to the author’s page (https://developer.wordpress.org/reference/functions/get_author_posts_url/), put this code into the loop of the blog or post template file below the blog post code (please contact the theme’s developer for help with where in what file of your … Read more