Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #262540

    Hi,
    1. Is it possible to add author name (linked) to the “post slider?”
    2. On an author page, the title (in the h1 .main-title) is not using the full author’s name. It is showing the username. e.g. “Author Archive for: username” instead of “Author Archive for: firstname lastname.” It’s not honoring the “Display name publicly as” setting on users as that is set to firstname lastname.

    Thanks!

    #262685

    Hey dmudie!

    Thank you for using the theme!

    1.) I’m sorry but we’re not entirely certain of the what it is you’re trying to do. Are you trying to link the post slider items to an author page? Maybe you can create a post then set the post format to link. Add the url of the author page.

    2.) Add this on functions.php to display the selected name:

    add_filter('avf_author_nickname', 'avf_author_display_name');
    
    function avf_author_display_name($name) {
    	$curauth = (get_query_var('author_name')) ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));
    	$output = __('Author Archive','avia_framework')." ";
    	
    	if(isset($curauth->nickname) && isset($curauth->ID))
    	{
    		$name = $curauth->display_name;
    		$output .= __('for:','avia_framework') ." ". $name;
    	}
    	
    	return $name;
    }

    Best regards,
    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.