Viewing 21 posts - 1 through 21 (of 21 total)
  • Author
    Posts
  • #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?

    #265454
    #265565

    Thanks.
    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,
    Amir

    #266262

    Yigit,

    Any suggestion about this?

    Thanks

    #266579

    Hi!

    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,
    Ismael

    #266719

    Hi 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 editor

    Additionally, 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.

    #267111

    Hey!

    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">  &rarr;</span></a>';
    			}
    

    Regards,
    Ismael

    #267948

    Hi 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

    #268431

    Hey!

    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!
    Ismael

    #268688
    #270426

    Hi Ismael,

    Can you please update.

    Thanks

    #271167

    Hi!

    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">  &rarr;</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">  &rarr;</span></a>';
    			}
    

    Regards,
    Peter

    #271268

    Hi 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

    #272383

    Hi Peter,

    Can you please advise.

    Thanks

    #273108

    Hi!

    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">  &rarr;</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,
    Peter

    #273293

    Peter,

    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

    #273684

    Hi!

    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,
    Ismael

    #273959

    Ismael,

    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

    #274401

    Hey!

    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">  &rarr;</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,
    Peter

    #274453
    This reply has been marked as private.
    #274510

    Hey!

    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

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