wpvidZ

Learn WordPress With Video Tutorials

  • Blog
  • Browse
    • Backup & Restore
    • WordPress Localhost
    • WordPress Hosting
    • WordPress themes
    • Version Updates
    • Plugin Tips
    • Security
    • Tutorials
    • WordPress SEO
    • WP Miscellaneous
    • Sitemap
  • WP 5+ Tutorial
  • Search
wpvidZ Blog WordPress themes How to Remove Twenty Fourteen Author Name or Link

WordPress themes

How to Remove Twenty Fourteen Author Name or Link

Last updated on February 22, 2017
Posted on July 21, 2014

This tips is for anyone who uses Twenty Fourteen theme in their websites, to remove the author link in the single post page.

By default, under the post title, you will find, the date, the Twenty Fourteen author link and name which is clickable, and the “leave a comment” post meta links.

For some reasons, you might want to hide or remove this WordPress author link from your theme.

I saw many forum posts, and many suggests, putting display:none; in style.css which I don’t recommend for these two reasons; although it is displayed none or basically hidden, but advanced browser user, can always view the source code from your homepage. And if they do that, they can easily find your author name and link.

Second, although I am not a SEO expert, putting “display:none;” attribute too much will have no good effect in your site’s SEO.

Post meta Twenty Fourteen author name and link
Post meta Twenty Fourteen author name and link

Every theme has different code, so I guess, if you use other theme, and not Twenty Fourteen theme, then this tutorial isn’t for you.

What will we achieve?

1.We will display the author name but will not be clickable or without link.

Author link isn't clickable
Author link isn’t clickable

2. We will remove it completely.

If you remove Twenty Fourteen author name and link completely
No Twenty Fourteen author name and link

So at this point, it’s up to you which one you want to do, but I will show you both in this tutorial.

What do we need to prepare?

1. Create the child theme first.

2. You will need access to your WP files, either by using FTP client or direct access. For this post, I am using FileZilla.

The Whole Process

Basically, we will need to modify the function twentyfourteen_posted_on() which we can find in content.php.

And this function itself is actually a replacable function, which mean we can replace the function with child theme’s function. (Some functions of a theme will load the child theme functions.php first, and then the parent theme’s, not overrided like stylesheet CSS file.)

This function is found inside the parent theme directory twentyfourteen/inc/template-tags.php line 101.

The function inside template-tags.php
The function inside template-tags.php

We copy the twentyfourteen_posted_on() function into our child theme’s functions.php and modify the code to remove the author name and link, or just to remove the link, and still show the author name.

Adding Social Media Links to WordPress Menu With CSS Classes

Steps:

  • Is my site loading fast? I use this shared hosting
  • Try my theme >

1. Create or edit functions.php of your child theme.

2. Add this code to completely remove the author name and the link. Do not forget to delete the <?php and ?> PHP block code if you have any content in your child theme’s functions.php. (I added many code in this child theme, you can check out how to remove the left sidebar and center align 2014 theme tutorial).

<?php
if ( ! function_exists( 'twentyfourteen_posted_on' ) ) :
/**
 * Print HTML with meta information for the current post-date/time and author.
 *
 * @since Twenty Fourteen 1.0
 */
function twentyfourteen_posted_on() {
	if ( is_sticky() && is_home() && ! is_paged() ) {
		echo '<span class="featured-post">' . __( 'Sticky', 'twentyfourteen' ) . '</span>';
	}

	// Set up and print post meta information.
	printf( '<span class="entry-date"><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s">%3$s</time></a></span>',
		esc_url( get_permalink() ),
		esc_attr( get_the_date( 'c' ) ),
		esc_html( get_the_date() )
	);
}
endif;
?>

Or Add this code to just remove the link, and make the author link not clickable.

<?php
//Code to remove the author of Twenty Fourteen child
if ( ! function_exists( 'twentyfourteen_posted_on' ) ) :
/**
 * Print HTML with meta information for the current post-date/time and author.
 *
 * @since Twenty Fourteen 1.0
 */
function twentyfourteen_posted_on() {
	if ( is_sticky() && is_home() && ! is_paged() ) {
		echo '<span class="featured-post">' . __( 'Sticky', 'twentyfourteen' ) . '</span>';
	}

	// Set up and print post meta information.
	printf( '<span class="entry-date"><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s">%3$s</time></a></span> <span class="byline"><span class="author vcard">%5$s</span></span>',
		esc_url( get_permalink() ),
		esc_attr( get_the_date( 'c' ) ),
		esc_html( get_the_date() ),
		esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
		get_the_author()
	);
}
endif;

?>

3. Save the new functions.php, and update it to your server. And check the changes.

Functions.php will look after editing
Functions.php will look after editing

4. (Thanks to Matt – see comment below for spotting the issue). Now, to display the human icon of the author, you can add following code in your style.css of the child theme, and save it.

/*Displaying author human icon*/
span.author.vcard:before{
		content: "\f304";
		-webkit-font-smoothing: antialiased;
		display: inline-block;
		font: normal 16px/1 Genericons;
		text-decoration: inherit;
		vertical-align: text-bottom;
	}

Clean browser’s cache if necessary.

author theme twenty fourteen twentyfourteen wp2014

Latest Posts

  • Twenty Nineteen Theme Full Tutorial – Creating a Website
  • Uninstall W3 Total Cache Plugin – Incredibly Easy!
  • Create WordPress Website 2018 on SiteGround Genesis
  • WordPress Noopener Noreferrer Rel Attribute Quick Fix
  • WordPress CDN Setup with MaxCDN and W3 Total Cache Plugin
  • Twenty Seventeen One Page Parallax Scrolling Website Style
  • How To Add Google Map in WordPress Contact Page
  • WordPress 4.7 Justify Text and Underline
  • Twenty Seventeen Footer “Proudly Powered By WordPress” Text
  • How To Add YouTube Subscribe Button To WordPress Website
← How I add thumbnails with Twenty Twelve theme
→ How To Create WordPress Child Theme Manually or With Plugin

Comments

  1. Matt Gallagher says

    September 29, 2014 at 3:42 pm

    Thank you for this helpful article – you saved me some previous time! I’m investigating using Twenty Fourteen for one of my sites, and wanted to make the author link unclickable – so this was very helpful.

    I noticed, however, that following the steps you outline you also lose the little Genericon f304 (outline person) icon immediately before the (newly unlinkable) author name.

    Digging in a little further I spotted that the main theme CSS (line 3243) added this character only for span classes. “.site-content” and “.byline” where there is a hypertext link – which is why it wasn’t appearing.
    I added an extra span class to your code (between “<span class=”byline”>” and “<span class=”author vcard”>” and then added that class into my child theme’s CSS with the code from the main theme CSS file (lines 3184 – 3188).

    Just a minor refinement on your ideas – I would have taken hours to solve this without your post – thank you.

    • Kim Muellner says

      October 10, 2014 at 5:01 pm

      Hello Matt,

      Thank you for pointing this out!! I didn’t realize it, and I am so glad that you found this. I will update the post.

      Yes, you can add another class, however alternatively, you can just add the current span class, which is span.author.vcard:before and applying the whole css attributes you mentioned.

      Sorry for the late approval and reply – not checking the blog for ages 🙂

      Kindly Kim.

  2. Thomas says

    October 26, 2014 at 8:10 pm

    Wow! Thanks for the video and then clearly typing the instructions out. I started today with another one of your tutorials and created my first childs theme. I have been modifying Twenty Fourteen for weeks now. I started with the custom CSS plugin and after a dozen modifications the site was slowing down. I have been slowly reading and watching your videos several times just to make sure I don’t make a critical errors and shut down my site. Twenty Fourteen is a great template but it has caused me to play with code that I would have never touched. Just wanted to thank you for your help and you sold me on subscribing.

    I did remove the date with some custom CSS and put that as a display none in the child’s styles.css folder. Can you share the code for removing the date also or is it OK to do that with the custom CSS code below added to the styles.css folder:

    header .entry-date {
    display: none;
    }

  3. Johannes says

    March 5, 2015 at 12:06 pm

    Aaaarg, no way to correct my post… sorry for the crazy link, here is the correction:

    Twenty Fifteen: the right way to remove post dates and author

  4. brb says

    April 5, 2016 at 7:08 pm

    Any chance you could show also how to add the category into the meta line under the title (instead of it preceding the title) in “twentyfourteen”? Thank you!

Comment form on this post is closed after 60 days.

Search

Worth Reading

  • Twenty Nineteen theme tutorialTwenty Nineteen Theme Full Tutorial - Creating a Website
  • Twenty Seventeen One Page ParallaxTwenty Seventeen One Page Parallax Scrolling Website Style
  • Twenty Seventeen Proudly Powered By WordPress codeTwenty Seventeen Footer "Proudly Powered By WordPress" Text
  • Where your child theme folder should be located inside themesHow To Create WordPress Child Theme Manually or With Plugin
  • How I add thumbnails with Twenty Twelve theme
  • Change Default Green Color WP 2014 Theme
  • Showing Twenty Fourteen Thumbnail in A Smaller Size
  • How To Style WordPress Caption in WP Twenty Fourteen Child
  • Proudly Powered By WordPress Twenty Fourteen
  • Setting Autoplay Twenty Fourteen Slider

Backup & Restore

Backup WordPress Without a Plugin or FTP

Export WordPress Database using phpMyAdmin

BigDump Alternative – When BigDump Failed Importing Large WP Database

At This Place The Current Query Includes More Than 300 Dump Lines

View All..

Live Online Website

View All..

Offline Installation

How to Upload WordPress localhost to live server manually

Steps to Install WordPress on Windows 8 and WAMP 2.4

Install WordPress on Mavericks OS X 2014

Maximum upload file size in WAMP WordPress

View All..


WPvidz Hosting Image

  • About Me
  • Contact
  • Affiliate Disclosure
  • Privacy Policy
  • Term of Use

Copyright© 2023 wpvidz.com SG2021 | sitemap.xml


WPvidz.com is independent from WordPress.org but is proudly powered by WordPress & its block-based editor (Gutenberg)

WpvidZ.com uses cookies" to give you the best browsing experience possible. If you click "I Accept" below then you are consenting to this. For more information about your privacy settings on this website, please visit the Privacy Policy page. I Accept