-
AuthorPosts
-
January 13, 2023 at 7:25 pm #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.January 14, 2023 at 11:16 am #1378663Hey 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ünterJanuary 14, 2023 at 1:05 pm #1378671But …
how to use the filter to show the whole content – for specific pages ?January 15, 2023 at 8:41 am #1378730it 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.January 16, 2023 at 3:29 pm #1378886Hi,
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ünterJanuary 16, 2023 at 5:07 pm #1378899But if i do not want to change it globaly – how to use that filter only for that specific page : aktuelles ?
January 17, 2023 at 7:03 am #1388009Hi,
You can check for the value of $current_post and create a condition accordingly.
Best regards,
IsmaelJanuary 17, 2023 at 11:07 am #1388025Well 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.
January 18, 2023 at 7:55 am #1393864Hi,
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,
IsmaelJanuary 18, 2023 at 10:22 am #1393875I 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”.January 18, 2023 at 12:39 pm #1393884Hi,
I added a working filter to functions.php in your child theme.
You also find it here:
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ünterJanuary 18, 2023 at 4:10 pm #1393940Many thanks – that is doing the job now.
January 18, 2023 at 4:18 pm #1393943 -
AuthorPosts
- The topic ‘blog alb and full content – does not work’ is closed to new replies.