Tagged: x
-
AuthorPosts
-
May 20, 2016 at 2:12 am #1001086
helloengParticipantHi
I’ve inserted the following code in my child theme’s functions.php
// Entry Meta – Adding Author Link
// =============================================================================if ( ! function_exists( ‘x_renew_entry_meta’ ) ) :
function x_renew_entry_meta() {//
// Author.
//$author = sprintf( ‘<span>%2$s</span>’,
get_author_posts_url( get_the_author_meta( ‘ID’ ) ),
get_the_author()
);//
// Date.
//$date = sprintf( ‘<span><time class=”entry-date” datetime=”%1$s”>%2$s</time></span>’,
esc_attr( get_the_date( ‘c’ ) ),
esc_html( get_the_date( ‘F j, Y’ ) )
);//
// Categories.
//if ( get_post_type() == ‘x-portfolio’ ) {
if ( has_term( ”, ‘portfolio-category’, NULL ) ) {
$categories = get_the_terms( get_the_ID(), ‘portfolio-category’ );
$separator = ‘, ‘;
$categories_output = ”;
foreach ( $categories as $category ) {
$categories_output .= ‘<a href=”‘
. get_term_link( $category->slug, ‘portfolio-category’ )
. ‘” title=”‘
. esc_attr( sprintf( __( “View all posts in: “%s””, ‘__x__’ ), $category->name ) )
. ‘”> ‘
. $category->name
. ‘‘
. $separator;
}$categories_list = sprintf( ‘<span>%s</span>’,
trim( $categories_output, $separator )
);
} else {
$categories_list = ”;
}
} else {
$categories = get_the_category();
$separator = ‘, ‘;
$categories_output = ”;
foreach ( $categories as $category ) {
$categories_output .= ‘<a href=”‘
. get_category_link( $category->term_id )
. ‘” title=”‘
. esc_attr( sprintf( __( “View all posts in: “%s””, ‘__x__’ ), $category->name ) )
. ‘”>’
. $category->name
. ‘‘
. $separator;
}$categories_list = sprintf( ‘<span>%s</span>’,
trim( $categories_output, $separator )
);
}//
// Comments link.
//if ( comments_open() ) {
$title = apply_filters( ‘x_entry_meta_comments_title’, get_the_title() );
$link = apply_filters( ‘x_entry_meta_comments_link’, get_comments_link() );
$number = apply_filters( ‘x_entry_meta_comments_number’, get_comments_number() );if ( $number == 0 ) {
$text = __( ‘Leave a Comment’ , ‘__x__’ );
} else if ( $number == 1 ) {
$text = $number . ‘ ‘ . __( ‘Comment’ , ‘__x__’ );
} else {
$text = $number . ‘ ‘ . __( ‘Comments’ , ‘__x__’ );
}$comments = sprintf( ‘<span>%3$s</span>’,
esc_url( $link ),
esc_attr( sprintf( __( ‘Leave a comment on: “%s”’, ‘__x__’ ), $title ) ),
$text
);} else {
$comments = ”;
}
//
// Output.
//if ( x_does_not_need_entry_meta() ) {
return;
} else {
printf( ‘<p class=”p-meta”>%1$s%2$s%3$s%4$s</p>’,
$author,
$date,
$categories_list,
$comments
);
}}
endif;This code successfully makes the author a link to that authors’ list of articles.
Is it possible to add an author BIO at the top of this page? Ideally the bio would be the regular wordpress Author information from that author’s profile. See Screenshot 2 for details (Screenshot_21.png)
(ignore screenshot 1, Screenshot_23.jpg)
Thanks
May 20, 2016 at 2:17 am #1001095
RupokMemberHey there,
Thanks for writing in! Regretfully this isn’t a feature offered by X. It could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities. Thanks for understanding. Take care!
May 20, 2016 at 2:31 am #1001118
helloengParticipantI’ve updated my thread. Is it still not possible?
May 20, 2016 at 2:40 am #1001124
helloengParticipantThis reply has been marked as private.May 20, 2016 at 2:58 am #1001155
Paul RModeratorHi,
Glad you were able to find a solution.
Have a great day!
May 20, 2016 at 4:52 am #1001267
helloengParticipantthanks. you too.
May 20, 2016 at 5:54 am #1001309
Paul RModeratorYou’re welcome! 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1001086 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
