• Resolved maciejkunicki

    (@maciejkunicki)


    Hello,

    I am using Hestia and I have problem with editing author pages (xyz.com/author/author-name). Exactly, I would like to change featured image on each author page with author profile.

    Can you advise how to do it?

    Cheers,
    Maciek

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter maciejkunicki

    (@maciejkunicki)

    Anyone had similar issue?

    AC

    (@purplecodes)

    Themeisle Support

    Hi @maciejkunicki,

    Thank you for reaching out.

    Apologies for the late response.

    I think this is more of a setting default to WordPress rather than the theme.
    You can check out this article below that may help:
    https://www.wpbeginner.com/plugins/how-to-add-an-authors-photo-in-wordpress/
    https://www.greengeeks.com/tutorials/article/how-to-include-an-author-photo-in-wordpress/

    Let us know if this works for you.

    Thread Starter maciejkunicki

    (@maciejkunicki)

    Unfortunately it didn’t help me. Both articles regards customizing author box and I meant editing of author page. I want to change featured image on this page, not picture of the author.
    Anyone has any idea?

    Hi @maciejkunicki,

    I have found a way to change the header image with the author gravatar on author archive pages, however, it looks stretched as the image within the page header is a background image, so its purpose is covering the entire section rather than being adjusted to look nice.

    The only way I was able to achieve this was by editing the theme file,
    hestia/inc/views/blog/class-hestia-header-layout-manager.php

    On line 510 there is a function called render_header_background()

    You can replace it with the following one

    	/**
    	 * Render the header background div.
    	 */
    	private function render_header_background() {
    		$background_image            = apply_filters( 'hestia_header_image_filter', $this->get_page_background() );
    		$customizer_background_image = get_background_image();
    
    		$header_filter_div = '<div class="header-filter';
    
    		$author_id = get_the_author_meta( 'ID' );
    		$author_profile_image_URL = get_avatar_url( $author_id );
    
    		/* Header Author Image */
    		if ( is_author() && $author_profile_image_URL ) {
    
    			$header_filter_div .= '" style="background-image: url(' . esc_url( $author_profile_image_URL ) . ');"';
    			/* Header Image */
    		} elseif ( ! empty( $background_image ) ) {
    			$header_filter_div .= '" style="background-image: url(' . esc_url( $background_image ) . ');"';
    			/* Gradient Color */
    		} elseif ( empty( $customizer_background_image ) ) {
    			$header_filter_div .= ' header-filter-gradient"';
    			/* Background Image */
    		} else {
    			$header_filter_div .= '"';
    		}
    		$header_filter_div .= '></div>';
    
    		echo apply_filters( 'hestia_header_wrapper_background_filter', $header_filter_div );
    
    	}

    I hope this will help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Editing author page’ is closed to new replies.