Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1378638

    on Enfold 5.3.1.1 i try to show full content in a blog alb – but neither post nor portfolio works.
    It always shows the excerpt with readmore.

    #1378663

    Hey Guenter,

    This is the intended and default Enfold behavior that in a blog content created with ALB is not executed.
    If you use a standard editor (even with shortcode) it is displayed correctly.

    see loop-index line 130 ff.

    If you really want to display the executed shortcode you can use the filter (line 130):

    
    $current_post['content'] = apply_filters( 'avf_the_content', '', 'loop_index' );
    

    and return whatever you like.

    Best regards,
    Günter

    #1378671

    But …
    how to use the filter to show the whole content – for specific pages ?

    #1378730

    it has to be inside the loop-index.php indeed – if i transfer the older one into the updated page – the full content is shown. Maybe because the layout is with html_header_sidebar – but even if this particular header layout is not set up that way, if “Full Content” is selected, it should be displayed. Otherwise this selection point would be superfluous.
    The reason I find this useful is obvious. One can quickly update a news page with the full news by assigning the “News” category to the post / portfolio.

    #1378886

    Hi,

    I understand the intention, but you have the risk of nested or circular called shortcodes which leads into endless loops or broken layout.
    That’s why we added a check for ALB Posts and force ‘excerpt_read_more’ for these.

    see includes\loop-index.php line 69.

    Good news is that there is filter at line 86:

    
    $blog_content = apply_filters( 'avf_blog_content_in_loop', $blog_content, $current_post, $blog_style, $blog_global_style );
    

    You can return ‘content’ to show the complete post content.
    But be sure to add logic to check where you want to change it.

    Best regards,
    Günter

    #1378899

    But if i do not want to change it globaly – how to use that filter only for that specific page : aktuelles ?

    #1388009

    Hi,

    You can check for the value of $current_post and create a condition accordingly.

    Best regards,
    Ismael

    #1388025

    Well then, please give the use of the filter as an example here. The page has the page-id-124 the full content should then be displayed there. You can still see the access data above.
    As long as this is not resolved i can not update my customer page with Enfold 4.8.7. On that version the full-content is shown by selecting that point.

    So the question remains as to the meaning of this selection option if the selection is ignored and only excerpts are displayed.

    #1393864

    Hi,

    Please try this snippet.

    add_filter('avf_blog_content_in_loop', function($blog_content, $current_post, $blog_style, $blog_global_style) {
        if($current_post['the_id'] !== 23) return; // ID of aktuelles page
        // do something with blog content
        return $blog_content;
    }, 10, 4);
    
    

    Best regards,
    Ismael

    #1393875

    I will describe it again in more detail.
    There is a page “News” on which I want to display portfolio posts with the full content. On all other pages it may remain as it is default set to excerpt_read_more. – that page is created with ALB and with Blog Posts ALB element – and the portfolios too are created with ALB.
    The idea behind this is that I only give the category “News” to the portfolio posts that should appear on this page – if the state changes, I only change the category from “News” to “Archive”.

    #1393884

    Hi,

    I added a working filter to functions.php in your child theme.

    You also find it here:

    https://github.com/KriesiMedia/enfold-library/blob/master/actions%20and%20filters/ALB%20Elements/Blog%20Posts/avf_blog_content_in_loop.php

    But please keep in mind that displaying ALB content might break the layout.
    We had users who faced this problem, thats why we removed it by default.

    We will add it to the description of the option.

    Best regards,
    Günter

    #1393940

    Many thanks – that is doing the job now.

    #1393943

    Hi,

    Glad we could help.

    Have a great day – I will close this topic.

    Best regards,
    Günter

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘blog alb and full content – does not work’ is closed to new replies.