-
AuthorPosts
-
May 15, 2014 at 1:59 pm #265280
Hi,
I want to give the archive pages a layout that will include excerpt and big preview image. Is there a way to configure this?
May 15, 2014 at 7:26 pm #265454Hi TheBlog!
Please see Peter’s post here – https://kriesi.at/support/topic/how-to-get-a-different-layout-for-the-blog-page-without-breaking-breadcrumbs/#post-256745
Cheers!
YigitMay 15, 2014 at 10:37 pm #265565Thanks.
I added code to functions.php and changed layout to multi-big.Next I created a page titled multi-big and set it to excerpt big previous image..
In page attributed I selected template to be archive.Archives pages still show the full posts one after the other. Tried with page attributes to be Default Template instead of archive but this also didn’t help.
Thanks,
AmirMay 18, 2014 at 11:05 am #266262Yigit,
Any suggestion about this?
Thanks
May 19, 2014 at 2:39 am #266579Hi!
Thank you for using the theme.
Do you mind if we take a look at the sample archive page? Archive pages uses the Blog Style that you set on Enfold > Blog Layout panel. What is the current blog layout that you have selected on the Blog Styling setting?
Best regards,
IsmaelMay 19, 2014 at 12:15 pm #266719Hi Ismael,
I have in Enfold Child the following settings (Blog is a page I built with Enfold advanced tool, it has Single Author, Big Preview + Excerpt with Read More link):
Front Page Settings: Blog
And where do you want to display the Blog?: Select Page (I tried also to select Blog or another page, no help)
Blog Style: Use the advanced layout editorAdditionally, I have the code you provided me in functions.php in the child theme (this is the only code in that php file. I tried a few options as in the link you provided and it does impact layout but “multi-big” doesn’t give me the layout of just excerpt and big preview image. Is there a list of these layout options?
Is there a way for the archive layout to be based on a page I build, like a proprietary layout?Code:
add_filter(‘avf_blog_style’,’avia_change_archive_blog_layout’, 10, 2);
function avia_change_archive_blog_layout($layout, $context){
if($context == ‘archive’) $layout = ‘multi-big’;
return $layout;
}Thanks again.
May 20, 2014 at 3:03 am #267111Hey!
Thank you for the info.
Edit includes > loop-index.php, find this code on line 184:
echo $content;
Replace it with:
if(!is_archive()){ echo $content; } else { $excerpt = the_excerpt(); echo $excerpt.'<a href="'.get_permalink().'" class="more-link">'.__('Read more','avia_framework').'<span class="more-link-arrow"> →</span></a>'; }
Regards,
IsmaelMay 21, 2014 at 12:52 pm #267948Hi Ismael,
The code did change archive pages to excerpt instead of full but it doesn’t include the featured image.
How do I add that before Excerpt?Thanks
May 22, 2014 at 4:34 am #268431Hey!
Thank you for the info.
It does show the featured image on my end. Do you mind if we take a look at the actual archive page on your installation?
Cheers!
IsmaelMay 22, 2014 at 5:36 pm #268688Sure, no problem: http://uppersideblog.staging.wpengine.com/2014/05/ (hosted on WPengine)
May 27, 2014 at 9:53 am #270426Hi Ismael,
Can you please update.
Thanks
May 28, 2014 at 3:10 pm #271167Hi!
Please replace the code Ismael posted :
if(!is_archive()){ echo $content; } else { $excerpt = the_excerpt(); echo $excerpt.'<a href="'.get_permalink().'" class="more-link">'.__('Read more','avia_framework').'<span class="more-link-arrow"> →</span></a>'; }
with
if(!is_archive()){ echo $content; } else { $excerpt = get_the_post_thumbnail( get_the_ID(), "large"); get_the_excerpt(); $excerpt .= get_the_excerpt(); echo $excerpt.'<a href="'.get_permalink().'" class="more-link">'.__('Read more','avia_framework').'<span class="more-link-arrow"> →</span></a>'; }
Regards,
PeterMay 28, 2014 at 5:02 pm #271268Hi Peter,
The code you provided here is exactly the same code I was using. Just in case I replaced the old one with the new one, as expected, same result.
Can you please check
Thanks
May 30, 2014 at 2:18 pm #272383Hi Peter,
Can you please advise.
Thanks
June 2, 2014 at 8:00 am #273108Hi!
I just checked the post pages – i.e. http://uppersideblog.staging.wpengine.com/test-1/#.U4wR4Pl_uPs (hosted on WPengine) – and you did not set a featured image yet. You just embedded the image into the content which is NOT a featured image but just part of the content. You’ve two options:
1) Set a featured image with the featured image field on the editor page: http://www.clipular.com/c/4793423542353920.png?k=y8qHkBan0XWxoUVi5LJ76ru2qvE
2) Use the content instead of the excerpt for the preview text – then you need to replace
if(!is_archive()){ echo $content; } else { $excerpt = the_excerpt(); echo $excerpt.'<a href="'.get_permalink().'" class="more-link">'.__('Read more','avia_framework').'<span class="more-link-arrow"> →</span></a>'; }
with
if(!is_archive()){ echo $content; } else { $excerpt = get_the_content(__('Read more','avia_framework'); }
and use the “More” quicktag: http://en.support.wordpress.com/splitting-content/more-tag/ to generate the excerpt.
Best regards,
PeterJune 2, 2014 at 3:41 pm #273293Peter,
There sure is a featured image set. That is exactly the problem.
It shows nicely on the main blog page: http://uppersideblog.staging.wpengine.com/ (hosted on WPengine)
But not on the Archive pages: http://uppersideblog.staging.wpengine.com/2014/05/Thanks
June 3, 2014 at 2:49 am #273684Hi!
Thank you for the update.
The changes suggested above does work on our end. Please post the login details here and set it as a private reply. If possible, please post the whole loop-index.php file codes on pastebin.com for inspection. We would like to check it.
Regards,
IsmaelJune 3, 2014 at 4:17 pm #273959Ismael,
Since I write in many cases the Excerpt manually + I don’t want to be required to add the read more tag this is not a good solution.
All I want is that the same experience as on my front page :http://uppersideblog.staging.wpengine.com/ (hosted on WPengine)
Will be on Archives: http://uppersideblog.staging.wpengine.com/2014/05/As you can see, in Test 1 on main page there is a manual Excerpt + featured image. I have set for this post read more tag while for the others I didn’t. I also didn’t set manual Excerpt for the others. See Blog-Test-6 as an example.
On the Archive page you can see that instead of manual Excerpt I get the read more tag excerpt while Blog-Test-6 the full content is seen.
I want the same experience I have on main page also on archives.
Required experience is:
Always present Excerpt + featured image.
If no manual Excerpt generate automatically the Excerpt or if read more tag exists take that.Thanks
June 4, 2014 at 7:52 am #274401Hey!
Try to revert the code changes we suggested in our last posts and add this code to the functions.php file:
add_filter('avf_blog_style','avia_change_archive_blog_layout', 10, 2); function avia_change_archive_blog_layout($layout, $context){ if($context == 'archive') $layout = 'single-small'; return $layout; } add_filter( 'post-format-standard', 'avia_category_content_filter', 15, 1); function avia_category_content_filter($current_post) { if(!is_single()) { $current_post['content'] = get_the_excerpt(); $current_post['content'] .= '<div class="read-more-link"><a href="'.get_permalink().'" class="more-link">'.__('Read more','avia_framework').'<span class="more-link-arrow"> →</span></a></div>'; } return $current_post; }
If the code still doesn’t change the archive page layout please create me an admin account and post the login credentials as private reply.
Regards,
PeterJune 4, 2014 at 12:41 pm #274453This reply has been marked as private.June 4, 2014 at 3:00 pm #274510Hey!
Thank you for the update.
The login credentials are incorrect. Dude’s code should work and the previous suggestions but the problem is, you’re not using the latest version of the theme. Please download the latest version Enfold 2.8.1 from your themeforest account then update the theme via FTP. Please refer to this link for more info: http://kriesi.at/documentation/enfold/updating-your-theme-files/
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.