How to Remove Twenty Fourteen Author Name or Link

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.

Related: Adding Social Media Links to WordPress Menu With CSS Classes

Steps:

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).

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

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.

Clean browser’s cache if necessary.

Share the knowledge
Share on Google+0Tweet about this on TwitterShare on Facebook1Pin on Pinterest0Share on Reddit0Email this to someonePrint this page

Comments

  1. says

    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.

    • says

      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. says

    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. brb says

    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!