Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1078028

    Hi!
    I really like the way the Magazine element displays articles, however, I wish it had an ‘excerpt’ and ‘read more’ option.
    Looking back at past posts, I see that various suggestions were made on how to fix this, however several of the posts seemed contradictory, and I failed in my attempts to replicate.

    Would it be possible to provide me with ‘best practices’ for providing excerpts and read more for the Magazine element. Oh, and I’m using a child theme in case that would make a difference.

    Many thanks!
    Drew

    #1078653

    Hi – it has been a few days. Any thoughts?

    #1078973

    Hi Drew,

    We apologize for the delayed response.
    Here are the steps to add the excerpt and read more:
    1. Use a child theme: https://kriesi.at/documentation/enfold/child-theme/ (skip this step if you already have one)

    Replace Avia Layout Builder element
    2. Follow the steps here: https://kriesi.at/documentation/enfold/intro-to-layout-builder/#add-elements-to-alb
    In your child theme’s functions.php, add this code:

    add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1);
    function avia_include_shortcode_template($paths)
    {
      $template_url = get_stylesheet_directory();
          array_unshift($paths, $template_url.'/shortcodes/');
    
      return $paths;
    }

    Then in your child theme create a folder named shortcodes

    3. In the shortcodes folder, create another folder called magazine and inside this folder add a file called magazine.php and paste this: https://pastebin.com/VCTFQuQ5

    Best regards,
    Nikko

    #1079024

    That worked like magic! Thank you so much for your help!

    #1079101

    Hi drewfr,

    Glad that we could help :)
    Thanks for using Enfold and have a great day!

    Best regards,
    Nikko

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Excerpt and Read More for Magazine element?’ is closed to new replies.