[Resolved] how to create an author box without the …… (read more ) link

Home Forums Support how to create an author box without the …… (read more ) link

  • This topic has 7 replies, 2 voices, and was last updated 1 month ago by Leo.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1419477
    huzaifa94

    Hi there.

    I want to create author boxes for my pages. But I do not want to have the read more link at the end of the author bio.

    The codes I found in the forum create that link.

    #1419490
    Leo
    Staff
    Customer Support

    Hi there,

    Any chance you can link us to the site in question?

    You can edit the original topic and use the private URL field.

    Let me know 🙂

    #1419497
    huzaifa94

    I am talking about the latter part of this code:

    <div class="author-box">
    	<div class="avatar">
    		<?php echo get_avatar( get_the_author_meta('user_email'), '96', '' ); ?>
    	</div>
    	<div class="author-info">
    		<h5 class="author-title" itemprop="author" itemscope itemtype="http://schema.org/Person">
    			<span itemprop="name"><?php printf( get_the_author_meta( 'display_name') );?></span>
    		</h5>
    		<div class="author-summary">
    			<p class="author-description"><?php echo wp_kses( get_the_author_meta( 'description' ), null ); ?></p></div>
    		<div class="author-links">
    			<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title="Read more">...</a>
    		</div>
    	</div>
    </div>

    The

    <div class="author-links">
    			<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title="Read more">...</a>
    		</div>

    function creates a link at the end of the author bio

    #1419502
    Leo
    Staff
    Customer Support

    Hmm removing this part of the code should work:

    <div class="author-links">
        <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title="Read more">...</a>
    </div>
    #1419509
    huzaifa94

    will I have to edit the corresponding CSS code?

    .author-box {
    	padding: 3%;
    	padding-bottom: 10px;
    	margin-top: 60px;
    	font-size: 0.9em;
    	background-color: #fff;
    	display: -webkit-box;
    	display: -ms-flexbox;
    	display: flex;
    	-webkit-box-align: center;
    	-ms-flex-align: center;
    	align-items: center;
    	border-radius: 5px;
    	box-shadow: rgba(23, 43, 99, .14) 0 7px 28px !important;
    }
    .author-box .avatar {
    	width: 250px;
    	height: auto;
    	border-radius: 100%;
    	margin-right: 30px;
    }
    h5.author-title {
    	margin-bottom: 0.1em;
    	font-weight: 600;
    }
    .author-description {
    	line-height: 1.6em
    }
    .author-links a {
    	margin-top: -1.5em;
    	font-size: 2em;
    	line-height: 2em;
    	float: left;
    }
    @media (max-width: 768px) {
    	.author-box {
    		padding: 20px;
    		padding-bottom: 0px;
    		margin-top: 100px;
    		flex-direction: column;
    		text-align: center;
    	}
    	.author-box .avatar {
    		margin-right: 0;
    		margin-bottom: 10px;
    		width: 100%;
    		margin-top: -35px;
    	}
    	.author-box .avatar img {
    		max-width: 100px;
    	}
    	.author-links a {
    		float: none;
    		align-self: center;
    	}
    	.author-description {
    		margin-bottom: -1.1em;
    	}
    }
    #1419563
    Leo
    Staff
    Customer Support

    You can remove these two blocks:

    .author-links a {
    	margin-top: -1.5em;
    	font-size: 2em;
    	line-height: 2em;
    	float: left;
    }
    .author-links a {
    		float: none;
    		align-self: center;
    }
    #1419624
    huzaifa94

    okay. thanks

    #1419714
    Leo
    Staff
    Customer Support
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.