• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2665

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

Add or Remove Post Author Link On Per Post Basis

This code creates a small meta box in the right hand sidebar of every single post edit screen. The checkbox enables you to display or hide the post author link. The post author link is included in the default post info entry meta displayed in the entry header, below the entry title on single posts and archives.

Here’s the checkbox:

author-link

And here’s the author link the checkbox adds or removes from your entry header:

post-info

When unchecked, the post author link is removes by default however you can easily modify this part of the code:

remove-author

The code enables you to add or remove any of the shortcodes from the post info for the post author post link, post date, comments or any other shortcodes you add to the post info.

Code Installation

There’s 2 simple steps to install the code:

  1. Upload the author-link-checkbox.php file to your child themes root directory.
  2. Include the file by adding the following line of code to your child themes functions file:
include_once( get_stylesheet_directory() . '/author-link-checkbox.php' );

Here’s the file for logged in members:

Register for full access

Related Tutorials

  • ACF Add True False Checkbox To Remove Author Name

Custom Fields Entry Meta

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems