Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1347612

    I’m not sure if I’m missing something in the theme settings so thought I’d bug you awesome devs again for help.

    I like the Blog page layout as shown here https://boylanpoint.com/wp-content/uploads/2022/04/blog-page.png

    But how can I use the same layout just below the author bio for the Author page here https://boylanpoint.com/wp-content/uploads/2022/04/author-page.png ?

    Here’s my current theme settings so far:
    Blog Layout > Blog Styling: Default (Business)
    Blog Layout > Blog Layout: Use the advance layout editor to build your own blog layout)

    Thanks for the help! :D

    #1347886

    Hey WebDevDept,

    Thank you for the inquiry.

    You have to modify the includes > loop-author.php file and look for this code around line 128.

    //echo the post title
    					echo $title;
    

    Above the line, just add this code to display the featured images.

    echo '<div class="big-preview ' . $blog_style . '" ' . avia_markup_helper( array( 'context' => 'image', 'echo' => false ) ) . '>' . $slider . '</div>';
    

    Best regards,
    Ismael

    #1348007

    Thanks Ismael!

    So now the featured image does show up, but the sizing of the image doesn’t match, see here https://boylanpoint.com/wp-content/uploads/2022/04/revised-author-page.png

    We’d like the featured image size to be the same as the blog page layout as shown here https://boylanpoint.com/wp-content/uploads/2022/04/blog-page.png if possible.

    #1348030

    Hi,

    Thank you for the update.

    To adjust the size of the featured images, please look for this code around line 40 in the same loop-author.php file..

    $current_post['slider'] = get_the_post_thumbnail($current_post['the_id'], $size);
    

    .. and replace it with:

    $current_post['slider'] = get_the_post_thumbnail($current_post['the_id'], "entry_with_sidebar");
    

    We adjusted the size parameter of the get_the_post_thumbnail function and made sure that it displays the “entry_with_sidebar” thumbnail.

    Best regards,
    Ismael

    #1348158

    Hello again, I added the line, but no results yet.
    below are lines 37 – 43 of my loop-author.php:
    `$size = strpos($blog_style, ‘big’) ? (strpos($current_post[‘post_layout’], ‘sidebar’) !== false) ? ‘entry_with_sidebar’ : ‘entry_without_sidebar’ : ‘square’;
    $current_post[‘slider’] = get_the_post_thumbnail($current_post[‘the_id’], “entry_with_sidebar”);
    $current_post[‘title’] = get_the_title();
    $current_post[‘content’] = apply_filters(‘avf_loop_author_content’, get_the_excerpt());
    $with_slider = empty($current_post[‘slider’]) ? ” : ‘with-slider’;`

    I have a similar problem with my category pages: the thumbnails just arent getting rendered at all.
    I get this element: <header class="entry-content-header">
    but not: <div class='page-thumb'>
    which makes me suspicious that the call on line 23 in loop-page.php (below) isn’t returning a value for these posts.
    $thumb = get_the_post_thumbnail( get_the_ID(), $avia_config['size'] );

    Additional info:
    – my primary page for my articles (the one that looks right) is set as the “blog page” in the ACOM theme options, and these other pages are not. Is there some kind of styling or templating that happens for the formatting of the primary page that I can copy over to my /category/{category} and author pages?

    #1348187

    Hi,

    Thanks for following up.

    We may need to access the site in order to check this modification further. Please post the login details in the private field and make sure that the Appearance > Theme File Editor panel is accessible.

    Best regards,
    Ismael

    #1349599
    This reply has been marked as private.
    #1349653

    Hi,

    Thank you for the info.

    We modified the includes > loop-author.php file and added this code around line 38.

    $size = "entry_with_sidebar";
    

    This is how the featured images in the author page looks now.

    Screenshot: https://1drv.ms/u/s!AjjTfXSRbKTvwGCmlntrvDGO1gqp?e=mnKkBA

    Best regards,
    Ismael

    #1349681

    Thank you Ismael, that did help a lot.

    How can I get the same sized featured image to show on the category and archive pages? Currently, no image is displayed at all.

    • This reply was modified 2 years ago by WebDevDept.
    #1349749

    Hi,

    Glad to know that the modifications are working. For the category and archives pages, please try to add this code in the functions.php file to enable the featured images.

    add_filter('avf_blog_style','avf_blog_style_mod', 10, 2); 
    function avf_blog_style_mod($layout, $context){
    	if($context == 'archive') $layout = 'single-big';
    	return $layout;
    }
    

    The functions.php file in the child theme doesn’t exist at the moment, so we were not able to add the filter.

    Best regards,
    Ismael

    #1350251

    You’re awesome Ismael thank you it worked!

    Go ahead and close this thread, thanks again! :D

    #1350272

    Hi,

    Great, I’m glad that Ismael could help you out :-)

    I’ll go ahead and close this thread for now then, please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘How to match Author page layout to Blog page layout’ is closed to new replies.