Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #215978

    Problem:

    when building a page with the layout builder the blog feature gives the oportunity to have

    – full text of the post
    – intro text
    – intro text plus “read more”

    But this don’t work with the <!more> tag :-(( So all of my 500 posts can’t be displayed on tha startpage within a page build with the layout builder. This “high-end-feature” uses just excerpts for intro??

    It only works when I say “show the blog on page xyz” in the theme settings – but then I can’t use the layout builder to make nice pages (eg startpage).

    What can I do?

    Greets,

    Stefan

    #216295

    Hi simpson199!

    Please try to insert following code into the functions.php file

    
    add_filter( 'post-format-standard', 'avia_category_content_filter', 15, 1);
    function avia_category_content_filter($current_post)
    {
    global $avia_config;
    global $more; 
    $more_bak = $more;
    
    if(!is_single() && $avia_config['blog_content'] == 'excerpt_read_more')
    {
    	$more = 0; 
    	$current_post['content'] =  get_the_content(__('Read more','avia_framework').'<span class="more-link-arrow">  &rarr;</span>');
    	$more = $more_bak;
    }
    return $current_post;
    }
    

    – it should pull the excerpt from the post content and truncate it with the “more” quicktag.

    Cheers!
    Peter

    #216325

    Thanx Peter!

    I copy pasted it from here to the end of the file

    /wp-content/themes/enfold/functions.php (which is original file)

    but the side then is down (white). Has there to be a special place within the file to paste the code?

    Greets

    Stefan

    #216337

    Hi!

    I think I missed a bracket at the end of the get_the_content() function. I updated the code – please try it again.

    Cheers!
    Peter

    #218891

    Thanx Peter!

    Sorry, but now the whole text of the article is shown on the startpage. The <!–more–> is still ignored on a side made with Avia Layout Architect :-/

    But I need the <!–more–> Tag Feature…

    Greets Stefan

    #219225

    Hey!

    Please try to replace

    
    if(!is_single() && $avia_config['blog_content'] == 'excerpt_read_more')
    

    with

    
    if(!is_single())
    

    Best regards,
    Peter

    #219463

    Thanx Peter,

    Now the Intro text is good in the Blog view in a page from the layoutbuilder. Cool :-)

    But (sorry ;-) ) other overviews like the “Masonry Kacheln”, that shows pictures and intros too, now shows html rubish…

    Again an idea? I would screenshot it but here is no options for screenshots…

    Greets & Thanks!

    Stefan

    • This reply was modified 10 years, 9 months ago by simpson199.
    #223190

    Hi Stefan!

    Use this service to post a screenshot:
    http://imgur.com/

    Cheers!
    Josue

    #223264

    Hey!

    Try following code

    
    add_filter( 'post-format-standard', 'avia_category_content_filter', 15, 1);
    function avia_category_content_filter($current_post)
    {
    global $avia_config;
    global $more; 
    $more_bak = $more;
    
    if(!is_single())
    {
    	$more = 0; 
    	$current_post['content'] =  strip_tags (get_the_content(''));
    	$current_post['content'] .= $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>';
    	$more = $more_bak;
    }
    return $current_post;
    }
    

    Best regards,
    Peter

    #223451

    Thanx Peter and Josue!

    The last code didn’t work in any way, gives serveral new hard errors. Twice intros on the frontpage and crzay stuff on the masonry category view.

    Suggestion: I know it’s hard to make support without have a look. The Code that worked best was the modified one before: Post view via the layoutbuilder ok (did make the right things with the more-tags) – but the “Masonry Category View” crashed.

    Look: Frontpage ok wp1.gsvbaden.de,

    Masonry Category View not: http://wp1.gsvbaden.de/uebersicht-news/

    The Code this far

    
    add_filter( 'post-format-standard', 'avia_category_content_filter', 15, 1);
    function avia_category_content_filter($current_post)
    {
    global $avia_config;
    global $more; 
    $more_bak = $more;
    
    if(!is_single())
    {
    	$more = 0; 
    	$current_post['content'] =  get_the_content(__('Read more','avia_framework').'<span class="more-link-arrow">  &rarr;</span>');
    	$more = $more_bak;
    }
    return $current_post;
    }

    Thanx :-)

    Stefan

    • This reply was modified 10 years, 9 months ago by simpson199.
    #225397

    Hi!

    The masonry layout doesn’t support the “more” tag and you must use the “excerpt field” for the excerpt. If you want to use both blog types I recommend to use this code instead: https://kriesi.at/support/topic/setting-blog-to-multi-author-big-preview-blog-with-title-excerpt-read-more/#post-221204 – then you can use the “excerpt field” for all posts regardless of the post type.

    Regards,
    Peter

    #230235

    Thanx Dude, I gonna try this and tell if it worked… Nice support anyway.

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Bug: No Post-Intro (via more-tag) ist shown when using AVIA Layout Builder’ is closed to new replies.