The way to Add Creator Field in WordPress Web site Submit Web page
A custom-made Creator Field has been added to your WordPress theme. Now, you must configure your Creator Profile. Go to the Dashboard > Customers > Your Profile. Now, Add your particulars in Identify, Contact information and In regards to the person part.
- copy the below-given code within the single.php file of your theme, in between div tags of the submit creator.
1 |
<h4 class="about-the-author"> About The Creator </h4><div class="postauthor-wrap"> <span itemscope="" itemprop="picture" alt="Photograph of <?php the_author_meta( 'display_name' ); ?>"> <?php if(function_exists('get_avatar')) { echo get_avatar( get_the_author_meta('email'), '100' ); } ?> </span> <h5 class="vcard author" itemprop="url" rel="author"> <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" class="fn" itemprop="name"> <span itemprop="author" itemscope="" itemtype="http://schema.org/Person"> <?php the_author_meta( 'display_name' ); ?> </span> </a> <span class="author-aka"> a.okay.a <span class="author-aka-name"> <?php echo get_the_author_meta('twitter'); ?> </span> </span> </h5><?php the_author_meta('description') ?> <span class="post-author-links"> <?php if (get_the_author_meta('facebook') != ''): ?> <a class="author-link f" title="Follow on Facebook" href="<?php echo get_the_author_meta('facebook'); ?>" target="_blank"> <i class="fa fa-facebook"> </i> </a> <?php endif; ?> <?php if (get_the_author_meta('twitter') != ''): ?> <a class="author-link t" title="Follow on Twitter" href="https://twitter.com/<?php echo get_the_author_meta('twitter'); ?>" target="_blank"> <i class="fa fa-twitter"> </i> </a> <?php endif; ?> <?php if (get_the_author_meta('googleplus') != ''): ?> <a class="author-link g" title="Follow on Google+" href="<?php echo get_the_author_meta('googleplus'); ?>" target="_blank"> <i class="fa fa-google-plus"> </i> </a> <?php endif; ?> </span> </div> |
- Additional, you must add the next CSS code within the fashion.css file of your theme.
1 |
/*-Creator Field---------------------------*/.postauthor-wrap {float: left;width: 100%;clear: each;padding: 30px;background: #fff;box-sizing: border-box;border-radius: 2px;-webkit-box-shadow: Zero 3px 5px Zero rgba(0,1,1,.1);-moz-box-shadow: Zero 3px 5px Zero rgba(0,1,1,.1);box-shadow: Zero 3px 5px Zero rgba(0,1,1,.1);}.postauthor-wrap .fn {font-size: 24px;}.postauthor img {float: proper;margin-left: 10px;margin-right: 0px;margin-bottom: 20px;border-radius: 50%;}.author-aka {font-size: 16px;text-transform: lowercase;font-weight: regular;coloration: #5e5e5e;}.author-aka-name {font-size: 17px;text-transform: lowercase;font-weight: regular;coloration: #111111;}.post-author-links {show: inline-block;}a.author-link {background: #cc0000;coloration: #fff;width: 30px;text-align: middle;line-height: 1;top: 30px;font-size: 12px;padding: 10px 0;box-sizing: border-box;border-radius: 100%;margin: Zero 7px Zero 0;float: left;}a.author-link.f {background: #3b5998;}a.author-link.t {background: #2DA8D2;}a.author-link.w {background: #e64522;} |