WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] How to remove author from posts?

[Resolved] How to remove author from posts?

Viewing 7 replies - 1 through 7 (of 7 total)
  • All content that is written in WP stores the author information. You can remove the author, but it would be a pain. If you just don’t want it to show up to users on the front end website, then edit your template file and remove the author link or use css to hide it from view using display:none.

    You’ll need to edit your files and find the php code for your author link.

    Create a backup of any files you want to edit first

    in author-template.php i found:

    * Display the name of the author of the current post.

    function the_author( $deprecated = '', $deprecated_echo = true ) {
    	if ( !empty( $deprecated ) )
    		_deprecated_argument( __FUNCTION__, '2.1' );
    	if ( $deprecated_echo !== true )
    		_deprecated_argument( __FUNCTION__, '1.5', __('Use <code>get_the_author()</code> instead if you do not want the value echoed.') );
    	if ( $deprecated_echo )
    		echo get_the_author();
    	return get_the_author();

    i need to change something here? or i’m looking in wrong place?

    no don’t change anything in the core WordPress files unless you know what you’re doing. Somewhere in your theme files (yoursite.com/wp-content/themes/your-theme) you will find several files that have something that looks like <?php the_author_link(); ?> that is what you need to remove.

    author.php

    <?php if(isset($_GET['author_name'])) : $curauth = get_user_by('slug', $author_name); else : $curauth = get_userdata(intval($author)); endif; ?>
        <div id="author-page">
        	<?php echo get_avatar($curauth->user_email, '90', $avatar); ?>
            <h1>About <?php echo $curauth->nickname; ?></h1>
        	<?php echo $curauth->user_description; ?>
            </div><!-- author-page -->
    <h2 id="author-page-posts-title">Articles Published by <?php echo $curauth->nickname; ?></h2>

    maybe here i need to change something?

    I guess the question is – wtf do you mean by “how to remove author?” in your initial post? Do you want their name to go away?

    If so look at the post above and open single.php, archive.php and index.php and remove the <?php the_author_link(); ?>

    thanks a lot. problem resolved.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] How to remove author from posts?’ is closed to new replies.
Skip to toolbar