UserPro Forums
  • Create new topic
  • Forums
    • No replies topics
    • Newest topics
    • Forum statistics
  • Account
    • Lost password
    • Register
    • Login
  • Documentation
  • Back to main site

Community Forums

User To User Support Forum/Forums/Customization Help / Requests/Author post link to profile

Author post link to profile

authorauthor_linkpost typeprofile
  • 9 years, 5 months ago Avatartronkybs
    Participant

    This is my code in the function.php file of the WordPress theme. How do I change it because the author points to the meta profile instead of the archive author? The theme is “Divi” by Elegant Themes

    PHP
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    if ( ! function_exists( 'et_get_the_author_posts_link' ) ) :
    function et_get_the_author_posts_link(){
    global $authordata, $themename;
     
    $link = sprintf(
    '<a href="%1$s" title="%2$s" rel="author">%3$s</a>',
    esc_url( get_author_posts_url( $authordata->ID, $authordata->user_nicename ) ),
    esc_attr( sprintf( __( 'Posts by %s', $themename ), get_the_author() ) ),
    get_the_author()
    );
    return apply_filters( 'the_author_posts_link', $link );
    }
    9 years, 5 months ago Avataradmin
    Keymaster

    What’s the meta profile? and what’s instead of the archive author? Is this function part of userpro?

    9 years, 5 months ago Avatartronkybs
    Participant

    No this is the function of the theme in use that recalls the author of the post …

    9 years, 5 months ago Avataradmin
    Keymaster

    Ok, it’d be better to contact the theme author directly about it. as he must be knowing better about this stuff than me 🙂

    9 years, 5 months ago Avatartronkybs
    Participant
    PHP
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    if ( ! function_exists( 'et_postinfo_meta' ) ) :
    function et_postinfo_meta( $postinfo, $date_format, $comment_zero, $comment_one, $comment_more ){
    global $themename;
     
    $postinfo_meta = '';
     
    if ( in_array( 'author', $postinfo ) )
    $postinfo_meta .= ' ' . esc_html__('by',$themename) . ' ' . et_get_the_author_posts_link() . ' | ';
     
    if ( in_array( 'date', $postinfo ) )
    $postinfo_meta .= get_the_time( $date_format ) . ' | ';
     
    if ( in_array( 'categories', $postinfo ) )
    $postinfo_meta .= get_the_category_list(', ')  . ' | ';
     
    if ( in_array( 'categories', $postinfo ) )
    $postinfo_meta .= get_the_term_list( $post->ID, 'genere', ' ', ', ', '' ) . ' | ';
     
    if ( in_array( 'comments', $postinfo ) )
    $postinfo_meta .= et_get_comments_popup_link( $comment_zero, $comment_one, $comment_more );
     
    echo $postinfo_meta;
    }

    here is the code that draws the columns to display in the meta post

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Disclaimer

This forum is 100% free and USER to USER support only. Technical support staff doesn’t monitor this forum actively.

If you are a customer and want to get technical support from our staff please submit a technical support ticket here: UserPRO Technical Support

Recent Topics

  • messy layout and signup not working
  • creating better layout
  • Custom Badges AddOn Plugin here
  • Green Trust Cash APplication
  • How to use cash app without a bank account

About forum

Here you can find help from UserPro plugin developers and other UserPro fellow users. Please be polite and ask your questions. NO SPAM!

Search Forums

Follow us

  • facebook
  • twitter
  • youtube
© Copyright UserPro