-
AuthorPosts
-
April 7, 2022 at 7:47 pm #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
April 11, 2022 at 3:18 am #1347886Hey 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,
IsmaelApril 11, 2022 at 9:49 pm #1348007Thanks 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.
April 12, 2022 at 5:13 am #1348030Hi,
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,
IsmaelApril 12, 2022 at 9:45 pm #1348158Hello 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?April 13, 2022 at 6:16 am #1348187Hi,
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,
IsmaelApril 27, 2022 at 3:07 am #1349599This reply has been marked as private.April 27, 2022 at 11:15 am #1349653Hi,
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,
IsmaelApril 27, 2022 at 5:47 pm #1349681Thank 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, 8 months ago by WebDevDept.
April 28, 2022 at 6:35 am #1349749Hi,
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,
IsmaelMay 3, 2022 at 2:08 am #1350251You’re awesome Ismael thank you it worked!
Go ahead and close this thread, thanks again! :D
May 3, 2022 at 9:31 am #1350272Hi,
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 -
AuthorPosts
- The topic ‘How to match Author page layout to Blog page layout’ is closed to new replies.